Opened 14 years ago
Closed 14 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 |
Change History (4)
comment:1 by , 14 years ago
| Triage Stage: | Unreviewed → Accepted |
|---|
comment:2 by , 14 years ago
| Component: | Uncategorized → Djangoproject.com Web site |
|---|---|
| Type: | Uncategorized → Bug |
comment:4 by , 14 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
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])