Opened 10 years ago

Closed 10 years ago

Last modified 9 years ago

#237 closed defect (invalid)

get_absolute_url doesn't show up right in admin

Reported by: hugo <gb@…> Owned by: adrian
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: UI/UX:

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 Changed 10 years ago by jacob

  • Resolution set to invalid
  • Status changed from new to closed

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 Changed 10 years ago by hugo <gb@…>

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