summaryrefslogtreecommitdiffstats
path: root/middleware.py
diff options
context:
space:
mode:
authorPhilip Sargent <philip@Muscogee.localdomain>2020-05-24 01:57:06 +0100
committerWookey <wookey@wookware.org>2020-05-24 20:56:27 +0100
commit50d753a87b5f6bc4fe31e222a37796cf903133f7 (patch)
tree885b01fa921893684b602c20392c1ef995e13482 /middleware.py
parent35f85c55f14e707e37d822041e25bca2913f48c4 (diff)
downloadtroggle-50d753a87b5f6bc4fe31e222a37796cf903133f7.tar.gz
troggle-50d753a87b5f6bc4fe31e222a37796cf903133f7.tar.bz2
troggle-50d753a87b5f6bc4fe31e222a37796cf903133f7.zip
Convert codebase for python3 usage
Diffstat (limited to 'middleware.py')
-rw-r--r--middleware.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/middleware.py b/middleware.py
index 7c27500..7699c6a 100644
--- a/middleware.py
+++ b/middleware.py
@@ -27,7 +27,7 @@ class SmartAppendSlashMiddleware(object):
if settings.SMART_APPEND_SLASH and (not old_url[1].endswith('/')) and not _resolves(old_url[1]) and _resolves(old_url[1] + '/'):
new_url[1] = new_url[1] + '/'
if settings.DEBUG and request.method == 'POST':
- raise RuntimeError, "You called this URL via POST, but the URL doesn't end in a slash and you have SMART_APPEND_SLASH set. Django can't redirect to the slash URL while maintaining POST data. Change your form to point to %s%s (note the trailing slash), or set SMART_APPEND_SLASH=False in your Django settings." % (new_url[0], new_url[1])
+ raise RuntimeError("You called this URL via POST, but the URL doesn't end in a slash and you have SMART_APPEND_SLASH set. Django can't redirect to the slash URL while maintaining POST data. Change your form to point to %s%s (note the trailing slash), or set SMART_APPEND_SLASH=False in your Django settings." % (new_url[0], new_url[1]))
if new_url != old_url:
# Redirect
if new_url[0]: