Opened 19 years ago

Closed 19 years ago

Last modified 18 years ago

#237 closed defect (invalid)

get_absolute_url doesn't show up right in admin

Reported by: hugo <gb@…> Owned by: Adrian Holovaty
Component: contrib.admin Version:
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I defined a get_absolute_url in a model to give '/files/something/' urls for objects. The admin shows the "view on site" link, but that link point's to /r/14/1 in my test - the view-on-site link doesn't point to the return value of the get_absolute_url method.

Change History (3)

comment:2 by Jacob, 19 years ago

Resolution: invalid
Status: newclosed

This has to do with the way those "view on site" links work; if you click on the link you'll see that you're redirected to the object's real URL from that /r/ place. It's an indirect link because of the way Django's admin handles multiple sites (look at django.views.defaults.shortcut)

comment:3 by hugo <gb@…>, 19 years ago

Ok, so it's just missing the documentation for the /r/ stuff - because none of the tutorial settings do set up an urlmatcher for /r/ and so you just get a 404 when clicking the "view on site" link.

Note: See TracTickets for help on using tickets.
Back to Top