mirror of
https://github.com/pretix/pretix.git
synced 2026-05-07 15:34:02 +00:00
* don't use flags to indicate languages #300 * cleaned code * removed the filter and moved the logic to context.py * cleaned code * show the text in the local language * cleaned code * changed loop for list comprehension * fix indentation * ordered import
This commit is contained in:
committed by
Raphael Michel
parent
7b22adb72e
commit
5932558ca2
@@ -1,5 +1,6 @@
|
||||
from django.conf import settings
|
||||
from django.core.files.storage import default_storage
|
||||
from django.utils.translation import get_language_info
|
||||
from i18nfield.strings import LazyI18nString
|
||||
|
||||
from pretix.base.settings import GlobalSettingsObject
|
||||
@@ -53,6 +54,7 @@ def contextprocessor(request):
|
||||
ctx['css_file'] = default_storage.url(request.event.settings.presale_css_file)
|
||||
ctx['event_logo'] = request.event.settings.get('logo_image', as_type=str, default='')[7:]
|
||||
ctx['event'] = request.event
|
||||
ctx['languages'] = [get_language_info(code) for code in request.event.settings.locales]
|
||||
|
||||
if hasattr(request, 'organizer'):
|
||||
ctx['organizer_logo'] = request.organizer.settings.get('organizer_logo_image', as_type=str, default='')[7:]
|
||||
|
||||
Reference in New Issue
Block a user