Opened 5 years ago

Closed 5 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 5 years ago by aaugustin

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

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 5 years ago by aaugustin

  • Component changed from Uncategorized to Web site
  • Type changed from Uncategorized to Bug

comment:3 Changed 5 years ago by aaugustin

  • UI/UX unset

#16419 was a duplicate.

comment:4 Changed 5 years ago by jezdez

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.
Back to Top