Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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
@adrianholovaty adrianholovaty authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  django/views/debug.py
View
3  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 @@ def _get_lines_from_file(filename, lineno, context_lines):
<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 %}
Please sign in to comment.
Something went wrong with that request. Please try again.