#16133: cannot access documentation django.contrib.admin -----------------------------------------+------------------------------- Reporter: anonymous | Owner: nobody Type: Uncategorized | Status: new Milestone: | Component: Uncategorized Version: 1.3 | Severity: Normal Resolution: | Keywords: Triage Stage: Accepted | Has patch: 0 Needs documentation: 0 | Needs tests: 0 Patch needs improvement: 0 | Easy pickings: 0 -----------------------------------------+------------------------------- Changes (by aaugustin):
* needs_better_patch: => 0 * needs_docs: => 0 * needs_tests: => 0 * stage: Unreviewed => Accepted Comment: 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]) }}} -- Ticket URL: <https://code.djangoproject.com/ticket/16133#comment:1> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.