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 = """
The current URL, {{ request.path|escape }}
, didn't match any of these.
The current URL, {{ request_path|escape }}
, didn't match any of these.
{{ reason|escape }}
{% endif %}