Skip to content

Instantly share code, notes, and snippets.

View NickBeeuwsaert's full-sized avatar

Nick Beeuwsaert NickBeeuwsaert

View GitHub Profile
from datetime import datetime
SUNDAY = 6
class UncleVernonMiddleware(object):
def __init__(self, app):
self.app = app
def __call__(self, environ, start_response):
if environ['REQUEST_METHOD'].lower() == 'post' and datetime.now().weekday() == SUNDAY: