get_absolute_url not being used correctly in admin interface?
|Reported by:||malcolm@…||Owned by:||adrian|
|Has patch:||no||Needs documentation:||yes|
|Needs tests:||no||Patch needs improvement:||no|
If a model defines a get_absolute_url(), the admin interface adds a "View on site" button. However, the URL created for the link does no use the string returned from get_absolute_url() at all.
In django/contrib/admin/views/main.py, the two places where a URL is constructed after looking get_absolute_url() both create something looking like r/1/4 where the first digit is the content type id and the latter is the object id. This looks like it is not what is intended.
Change History (3)
comment:2 Changed 11 months ago by cyogesh
- Easy pickings unset
- Needs documentation set
- Resolution fixed deleted
- Status changed from closed to new
- Type changed from defect to Bug
- UI/UX unset