summaryrefslogtreecommitdiff
path: root/django/middleware/common.py
diff options
context:
space:
mode:
authorRamiro Morales <cramm0@gmail.com>2013-05-26 23:47:50 -0300
committerRamiro Morales <cramm0@gmail.com>2013-05-26 23:47:50 -0300
commit0fa8d43e742ee8b480d938a47836b5a3720c2677 (patch)
tree19212a58dfb62be483ba5e8e24602c8f4def0c36 /django/middleware/common.py
parentd228c1192ed59ab0114d9eba82ac99df611652d2 (diff)
Replaced `and...or...` constructs with PEP 308 conditional expressions.
Diffstat (limited to 'django/middleware/common.py')
-rw-r--r--django/middleware/common.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/middleware/common.py b/django/middleware/common.py
index 1131bd698d..2c76c47756 100644
--- a/django/middleware/common.py
+++ b/django/middleware/common.py
@@ -85,7 +85,7 @@ class CommonMiddleware(object):
return
if new_url[0]:
newurl = "%s://%s%s" % (
- request.is_secure() and 'https' or 'http',
+ 'https' if request.is_secure() else 'http',
new_url[0], urlquote(new_url[1]))
else:
newurl = urlquote(new_url[1])