forked from CGM_Public/pretix_original
Upgrade to Django 2.1 (#710)
* Upgrade to Django 2.0 * more models * i18n foo * Update setup.py * Fix Sentry exception PRETIXEU-JC * Enforce slug uniqueness * Import sorting * Upgrade to Django 2.1 * Travis config * Try to fix PostgreSQL failure * Smaller test matrix * staticfiles→static * Include request in all authenticate() calls
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
from django.utils import timezone
|
||||
from django.utils.translation.trans_real import DjangoTranslation
|
||||
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
|
||||
from django.views.i18n import JavaScriptCatalog, 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
|
||||
@@ -18,6 +19,6 @@ js_info_dict = {
|
||||
@etag(lambda *s, **k: import_date)
|
||||
@cache_page(3600, key_prefix='js18n-%s' % import_date)
|
||||
def js_catalog(request, lang):
|
||||
packages = ['pretix']
|
||||
catalog, plural = get_javascript_catalog(lang, 'djangojs', packages)
|
||||
return render_javascript_catalog(catalog, plural)
|
||||
c = JavaScriptCatalog()
|
||||
c.translation = DjangoTranslation(lang, domain='djangojs')
|
||||
return render_javascript_catalog(c.get_catalog(), c.get_plural())
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import urllib.parse
|
||||
|
||||
from django.core import signing
|
||||
from django.core.urlresolvers import reverse
|
||||
from django.http import HttpResponseBadRequest, HttpResponseRedirect
|
||||
from django.urls import reverse
|
||||
|
||||
|
||||
def redir_view(request):
|
||||
|
||||
Reference in New Issue
Block a user