Files
pretix_cgo/src/pretix/base/context.py
2019-10-07 09:03:46 +02:00

14 lines
274 B
Python

import sys
from django.conf import settings
def contextprocessor(request):
ctx = {}
if settings.DEBUG and 'runserver' not in sys.argv:
ctx['debug_warning'] = True
elif 'runserver' in sys.argv:
ctx['development_warning'] = True
return ctx