#15931: Patch for admin change form to dodge multi-db bug
---------------------------+-------------------------------
Reporter: dchandek | Owner: nobody
Type: Uncategorized | Status: new
Milestone: | Component: contrib.admin
Version: 1.3 | Severity: Normal
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Easy pickings: 1
---------------------------+-------------------------------
A multi-db bug in django.contrib.contenttypes is triggered via the "View
on site" link on the admin site change form when the model uses a
different db from the contenttypes app (see discussion at
https://groups.google.com/d/topic/django-users/Y50SimNd8zo/discussion and
related ticket at #15610). If I follow the logic correctly, there is no
need to route the "View on site" link through
django.contrib.contenttypes.views.shortcut b/c the admin view has already
determined that the model has implemented get_absolute_url, and the
shortcut view simply repeats the process -- i.e. by a convoluted method
that gets the object and calls get_absolute_url -- except that it trips
the aforementioned bug. While this bug should obviously be fixed, the
change form can be patched with the attached file.
--
Ticket URL: <http://code.djangoproject.com/ticket/15931>
Django <http://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 [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.