Skip to content
Browse files

fixes #1549 endless redirect if browser language is not a cms language

Conflicts:
	cms/views.py
  • Loading branch information...
1 parent 9c70a95 commit 389fa3a5add1e026f0c5c661a017252752fda2ba @stefanfoulis stefanfoulis committed
Showing with 4 additions and 3 deletions.
  1. +4 −3 cms/views.py
View
7 cms/views.py
@@ -60,9 +60,10 @@ def details(request, slug):
with SettingsOverride(LANGUAGES=languages, LANGUAGE_CODE=languages[0][0]):
#get supported language
new_language = translation.get_language_from_request(request)
- with force_language(new_language):
- pages_root = reverse('pages-root')
- return HttpResponseRedirect(pages_root + attrs)
+ if new_language in get_public_languages():
+ with force_language(new_language):
+ pages_root = reverse('pages-root')
+ return HttpResponseRedirect(pages_root + attrs)
else:
_handle_no_page(request, slug)
else:

0 comments on commit 389fa3a

Please sign in to comment.
Something went wrong with that request. Please try again.