Opened 8 years ago

Closed 8 years ago

#16133 closed Bug (fixed)

cannot access documentation django.contrib.admin

Reported by: anonymous Owned by: nobody
Component: * 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

Change History (4)

comment:1 Changed 8 years ago by Aymeric Augustin

Triage Stage: UnreviewedAccepted

Indeed, there's a bug in django_website/docs/

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 Changed 8 years ago by Aymeric Augustin

Component: Web site
Type: UncategorizedBug

comment:3 Changed 8 years ago by Aymeric Augustin

UI/UX: unset

#16419 was a duplicate.

comment:4 Changed 8 years ago by Jannis Leidel

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