Skip to content

Instantly share code, notes, and snippets.

@wbbradley
wbbradley / compo.c
Created April 14, 2020 23:02 — forked from chriscamacho/compo.c
Raylib 32x32 competition template
/**********************************************************************************************
*
* raylib 32x32 game/demo competition
*
* Competition consist in developing a videogame in a 32x32 pixels screen size.
*
* RULES:
*
* 1) Use only raylib (and included libraries), no external libraries allowed
* 2) The submission should consist of just one source file
# 1) Add MasqueradeMiddleware to Django's middleware stack (see comment below for placement)
class MasqueradeMiddleware(object):
'''
Looks for a field in the active session specifying a user to masquerade as
and sets request.user to that user, storing the real user to the session.
This middleware is dependent on the existence of sessions, so it should be
deployed after ('inside') Django's session middleware. It should probably
be deployed after middleware like the TermsAndConditionsMiddleware which
implement one-time intercepts, so that masquerading superusers don't get