Add region setting to supplement localization (#1875)

This commit is contained in:
Raphael Michel
2020-12-14 13:15:38 +01:00
committed by GitHub
parent e311341d01
commit 04bfa63a5e
46 changed files with 281 additions and 90 deletions

View File

@@ -329,7 +329,10 @@ def iframe_entry_view_wrapper(view_func):
locale = request.GET.get('locale')
if locale and locale in [lc for lc, ll in settings.LANGUAGES]:
with language(locale):
region = None
if hasattr(request, 'event'):
region = request.event.settings.region
with language(locale, region):
resp = view_func(request, *args, **kwargs)
max_age = 10 * 365 * 24 * 60 * 60
set_cookie_without_samesite(