mirror of
https://github.com/pretix/pretix.git
synced 2026-02-04 02:22:28 +00:00
* play around * Flip things in presale * Convert backend * Remove test settings * Safe getattr
16 lines
361 B
Python
16 lines
361 B
Python
import sys
|
|
|
|
from django.conf import settings
|
|
|
|
|
|
def contextprocessor(request):
|
|
ctx = {
|
|
'rtl': getattr(request, 'LANGUAGE_CODE', 'en') in settings.LANGUAGES_RTL,
|
|
}
|
|
if settings.DEBUG and 'runserver' not in sys.argv:
|
|
ctx['debug_warning'] = True
|
|
elif 'runserver' in sys.argv:
|
|
ctx['development_warning'] = True
|
|
|
|
return ctx
|