Opened 18 years ago

Closed 18 years ago

Last modified 17 years ago

#928 closed defect (fixed)

Admin documentation don't work after [1443]

Reported by: Nebojša Đorđević - nesh <nesh@…> Owned by: Adrian Holovaty
Component: contrib.admin Version:
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Admin autogenerated doc don't work after tag/filter changes. All I can get /admin/doc/tags/ or /admin/doc/filters/ is:

Request Method:  	GET
Request URL: 	http://jurofungo.zeus.quattro/admin/doc/filters/
Exception Type: 	AttributeError
Exception Value: 	'module' object has no attribute 'registered_tags'
Exception Location: 	/store/django/django/contrib/admin/views/doc.py in template_filter_index, line 72
Traceback (innermost last)

    * /store/django/django/core/handlers/base.py in get_response
        66. # Apply view middleware
        67. for middleware_method in self._view_middleware:
        68. response = middleware_method(request, callback, param_dict)
        69. if response:
        70. return response
        71.
        72. try:
        73. response = callback(request, **param_dict) ...
        74. except Exception, e:
        75. # If the view raised an exception, run it through exception
        76. # middleware, and if the exception middleware returns a
        77. # response, use that. Otherwise, reraise the exception.
        78. for middleware_method in self._exception_middleware:
        79. response = middleware_method(request, e)

    * /store/django/django/contrib/admin/views/decorators.py in _checklogin
        41. """
        42. Decorator for views that checks that the user is logged in and is a staff
        43. member, displaying the login page if necessary.
        44. """
        45. def _checklogin(request, *args, **kwargs):
        46. if not request.user.is_anonymous() and request.user.is_staff:
        47. # The user is valid. Continue to the admin page.
        48. return view_func(request, *args, **kwargs) ...
        49.
        50. assert hasattr(request, 'session'), "The Django admin requires session middleware to be installed. Edit your MIDDLEWARE_CLASSES setting to insert 'django.middleware.sessions.SessionMiddleware'."
        51.
        52. # If this isn't already the login page, display it.
        53. if not request.POST.has_key(LOGIN_FORM_KEY):
        54. if request.POST:

    * /store/django/django/contrib/admin/views/doc.py in template_filter_index
        65. return render_to_response('admin_doc/template_tag_index', {'tags': tags}, context_instance=DjangoContext(request))
        66. template_tag_index = staff_member_required(template_tag_index)
        67.
        68. def template_filter_index(request):
        69. if not doc:
        70. return missing_docutils_page(request)
  71.
        72. saved_tagset = template.registered_tags.copy(), template.registered_filters.copy() ...
        73. load_all_installed_template_libraries()
        74.
        75. filters = []
        76. for filtername in template.registered_filters:
        77. title, body, metadata = doc.parse_docstring(template.registered_filters[filtername][0].__doc__)
        78. if title:

Change History (2)

comment:1 by Adrian Holovaty, 18 years ago

Status: newassigned

comment:2 by Adrian Holovaty, 18 years ago

Resolution: fixed
Status: assignedclosed

(In [1462]) Fixed #928 -- Fixed admin documentation breakage after [1443]. Thanks for reporting, nesh

Note: See TracTickets for help on using tickets.
Back to Top