1
0
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:
Ramiro Morales
2013-05-26 23:47:50 -03:00
parent d228c1192e
commit 0fa8d43e74
25 changed files with 37 additions and 39 deletions

View File

@@ -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)