Django

Code

Changeset 4959

Show
Ignore:
Timestamp:
04/08/07 20:10:26 (2 years ago)
Author:
adrian
Message:

Fixed #3942 -- Fixed potential confusion on debug 404 page by stripping initial slash from the display of the current URL. Thanks, Collin Grady

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/views/debug.py

    r4265 r4959  
    145145    c = Context({ 
    146146        'root_urlconf': settings.ROOT_URLCONF, 
     147        'request_path': request.path[1:], # Trim leading slash 
    147148        'urlpatterns': tried, 
    148149        'reason': str(exception), 
     
    592593        {% endfor %} 
    593594      </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> 
    595596    {% else %} 
    596597      <p>{{ reason|escape }}</p>