Browse Source

Fix staré Django

middleware_test
MaM Web user 3 years ago
parent
commit
c4d533c870
  1. 4
      mamweb/context_processors.py

4
mamweb/context_processors.py

@ -11,9 +11,9 @@ def vzhled(request):
return {'noc' : noc}
def april(req):
if 'X-April' in req.headers:
if 'HTTP_X_APRIL' in req.META:
try:
year = int(req.headers['X-April'])
year = int(req.META['HTTP_X_APRIL'])
return {'april': year}
except:
pass # Fall-back to regular behaviour

Loading…
Cancel
Save