#27018: Admin views in admindocs crash with AttributeError -----------------------------------+------------------------------------ Reporter: MarkusH | Owner: helenst Type: Bug | Status: assigned Component: contrib.admindocs | Version: 1.10 Severity: Normal | Resolution: Keywords: | Triage Stage: Accepted Has patch: 0 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -----------------------------------+------------------------------------
Comment (by helenst): I've fixed this but it's a Python 3 only fix due to the use of `__qualname__` to find out which class the view comes from and therefore generate the correct URL. There are ways to emulate `__qualname__` in py2, but kind of hacky. I see in migrations/serializers.py qualname is also used and a message generated for py2 users. Is a Python 3 only solution acceptable here? In Python 2 it will continue to just not work (and could be tidied up to raise a 404 rather than an error). I am not sure what is the best thing here, so some input would be good! All is pushed to the branch linked above. There is also the issue of ensuring the tests pass (i.e. I have added test cases but they only pass for python 3). -- Ticket URL: <https://code.djangoproject.com/ticket/27018#comment:5> 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 django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/065.714b8cfc8885fe6c7c91556fc4554df4%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.