summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Holovaty <adrian@holovaty.com>2007-04-09 01:10:26 +0000
committerAdrian Holovaty <adrian@holovaty.com>2007-04-09 01:10:26 +0000
commit0e0a1dc0b717d3354e6bada48a7ea127248a3d7c (patch)
tree22fd9221d59e2de70a8de032509e6a65cdbdb3e4
parent0498eb30cbd8acd0ecd7175393a713e6ceab681d (diff)
Fixed #3942 -- Fixed potential confusion on debug 404 page by stripping initial slash from the display of the current URL. Thanks, Collin Grady
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4959 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--django/views/debug.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/django/views/debug.py b/django/views/debug.py
index 77b6c2fac2..b49a98a864 100644
--- a/django/views/debug.py
+++ b/django/views/debug.py
@@ -144,6 +144,7 @@ def technical_404_response(request, exception):
t = Template(TECHNICAL_404_TEMPLATE, name='Technical 404 template')
c = Context({
'root_urlconf': settings.ROOT_URLCONF,
+ 'request_path': request.path[1:], # Trim leading slash
'urlpatterns': tried,
'reason': str(exception),
'request': request,
@@ -591,7 +592,7 @@ TECHNICAL_404_TEMPLATE = """
<li>{{ pattern|escape }}</li>
{% endfor %}
</ol>
- <p>The current URL, <code>{{ request.path|escape }}</code>, didn't match any of these.</p>
+ <p>The current URL, <code>{{ request_path|escape }}</code>, didn't match any of these.</p>
{% else %}
<p>{{ reason|escape }}</p>
{% endif %}