Opened 3 years ago
Last modified 3 years ago
#33955 closed Bug
AttributeError in admindocs ViewDetailView — at Initial Version
Description ¶
In Django 4.1, the admindocs ViewDetailView
raises an AttributeError
. I'm not clear on why _active
is missing the local_value
attribute when _is_callback
is called.
Quick and dirty fix in django/contrib/admindocs/utils.py
:
Code highlighting:
def _is_callback(name, urlresolver=None): if not hasattr(_active, "local_value"): _active.local_value = _callback_strs if urlresolver and not urlresolver._populated: register_callback(urlresolver, _active.local_value) return name in _active.local_value
Note:
See TracTickets
for help on using tickets.