mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
Replaced and...or... constructs with PEP 308 conditional expressions.
This commit is contained in:
@@ -49,7 +49,7 @@ class LocaleMiddleware(object):
|
||||
|
||||
if path_valid:
|
||||
language_url = "%s://%s/%s%s" % (
|
||||
request.is_secure() and 'https' or 'http',
|
||||
'https' if request.is_secure() else 'http',
|
||||
request.get_host(), language, request.get_full_path())
|
||||
return HttpResponseRedirect(language_url)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user