mirror of
https://github.com/pretix/pretix.git
synced 2026-05-05 15:14:04 +00:00
Fixed problem in LocaleSet view with view names in next= parameters
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
from datetime import datetime, timedelta
|
||||
|
||||
from django.conf import settings
|
||||
from django.shortcuts import redirect
|
||||
from django.http import HttpResponseRedirect
|
||||
from django.utils.http import is_safe_url
|
||||
from django.views.generic import View
|
||||
|
||||
@@ -11,7 +11,7 @@ class LocaleSet(View):
|
||||
def get(self, request, *args, **kwargs):
|
||||
url = request.GET.get('next', request.META.get('HTTP_REFERER', '/'))
|
||||
url = url if is_safe_url(url, host=request.get_host()) else '/'
|
||||
resp = redirect(url)
|
||||
resp = HttpResponseRedirect(url)
|
||||
|
||||
locale = request.GET.get('locale')
|
||||
if locale in [lc for lc, ll in settings.LANGUAGES]:
|
||||
|
||||
Reference in New Issue
Block a user