Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #3942 -- Fixed potential confusion on debug 404 page by strippi…

…ng 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
  • Loading branch information...
commit 0e0a1dc0b717d3354e6bada48a7ea127248a3d7c 1 parent 0498eb3
Adrian Holovaty authored April 09, 2007

Showing 1 changed file with 2 additions and 1 deletion. Show diff stats Hide diff stats

  1. 3  django/views/debug.py
3  django/views/debug.py
@@ -144,6 +144,7 @@ def technical_404_response(request, exception):
144 144
     t = Template(TECHNICAL_404_TEMPLATE, name='Technical 404 template')
145 145
     c = Context({
146 146
         'root_urlconf': settings.ROOT_URLCONF,
  147
+        'request_path': request.path[1:], # Trim leading slash
147 148
         'urlpatterns': tried,
148 149
         'reason': str(exception),
149 150
         'request': request,
@@ -591,7 +592,7 @@ def _get_lines_from_file(filename, lineno, context_lines):
591 592
           <li>{{ pattern|escape }}</li>
592 593
         {% endfor %}
593 594
       </ol>
594  
-      <p>The current URL, <code>{{ request.path|escape }}</code>, didn't match any of these.</p>
  595
+      <p>The current URL, <code>{{ request_path|escape }}</code>, didn't match any of these.</p>
595 596
     {% else %}
596 597
       <p>{{ reason|escape }}</p>
597 598
     {% endif %}

0 notes on commit 0e0a1dc

Please sign in to comment.
Something went wrong with that request. Please try again.