#33955: AttributeError in admindocs ViewDetailView
---------------------------------------------+------------------------
               Reporter:  Greg Kaleka        |          Owner:  nobody
                   Type:  Bug                |         Status:  new
              Component:  contrib.admindocs  |        Version:  4.1
               Severity:  Normal             |       Keywords:
           Triage Stage:  Unreviewed         |      Has patch:  1
    Needs documentation:  0                  |    Needs tests:  0
Patch needs improvement:  0                  |  Easy pickings:  0
                  UI/UX:  0                  |
---------------------------------------------+------------------------
 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`:

 {{{
 #!div style="font-size: 80%"
 Code highlighting:
   {{{#!python
   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
   }}}
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/33955>
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/01070182d0bd5d5a-6a26a7c8-bb24-4236-a58d-8b278c80d378-000000%40eu-central-1.amazonses.com.

Reply via email to