forked from CGM_Public/pretix_original
Workaround to fix #378
See https://github.com/zyegfryed/django-statici18n/pull/29 for real fix
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
from django.utils import timezone
|
||||
from django.views.decorators.cache import cache_page
|
||||
from django.views.decorators.http import etag
|
||||
from django.views.i18n import (
|
||||
get_javascript_catalog, render_javascript_catalog, to_locale,
|
||||
)
|
||||
from django.views.i18n import get_javascript_catalog, render_javascript_catalog
|
||||
|
||||
# Yes, we want to regenerate this every time the module has been imported to
|
||||
# refresh the cache at least at every code deployment
|
||||
@@ -21,5 +19,5 @@ js_info_dict = {
|
||||
@cache_page(3600, key_prefix='js18n-%s' % import_date)
|
||||
def js_catalog(request, lang):
|
||||
packages = ['pretix']
|
||||
catalog, plural = get_javascript_catalog(to_locale(lang), 'djangojs', packages)
|
||||
catalog, plural = get_javascript_catalog(lang, 'djangojs', packages)
|
||||
return render_javascript_catalog(catalog, plural)
|
||||
|
||||
Reference in New Issue
Block a user