Opened 13 years ago

Closed 13 years ago

#16133 closed Bug (fixed)

cannot access documentation django.contrib.admin

Reported by: anonymous Owned by: nobody
Component: *.djangoproject.com Version: 1.3
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Change History (4)

comment:1 by Aymeric Augustin, 13 years ago

Triage Stage: UnreviewedAccepted

Indeed, there's a bug in django_website/docs/views.py:

def redirect_index(request, *args, **kwargs):
    return redirect(request.path.rstrip('index/'))

This will strip all 'i', 'n', 'd', 'e', 'x' and '/' characters from the end of the URL. In this case, it will strip in/index. This is obviously wrong.

This function could be written like this:

def redirect_index(request, *args, **kwargs):
    assert request.path.endswith('index/')
    return redirect(request.path[:-6])

comment:2 by Aymeric Augustin, 13 years ago

Component: UncategorizedDjangoproject.com Web site
Type: UncategorizedBug

comment:3 by Aymeric Augustin, 13 years ago

UI/UX: unset

#16419 was a duplicate.

comment:4 by Jannis Leidel, 13 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.
Back to Top