mirror of
https://github.com/pretix/pretix.git
synced 2026-05-05 15:14:04 +00:00
Show warnings about development mode and DEBUG mode
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import sys
|
||||
from django.conf import settings
|
||||
from django.core.urlresolvers import Resolver404, get_script_prefix, resolve
|
||||
|
||||
@@ -46,4 +47,9 @@ def contextprocessor(request):
|
||||
ctx['js_date_format'] = get_javascript_format('DATE_INPUT_FORMATS')
|
||||
ctx['js_locale'] = get_moment_locale()
|
||||
|
||||
if settings.DEBUG and 'runserver' not in sys.argv:
|
||||
ctx['debug_warning'] = True
|
||||
elif 'runserver' in sys.argv:
|
||||
ctx['development_warning'] = True
|
||||
|
||||
return ctx
|
||||
|
||||
Reference in New Issue
Block a user