Re: [Django] #680: get_absolute_url not being used correctly in admin interface?

6 views
Skip to first unread message

Django

unread,
Jun 2, 2013, 8:30:37 PM6/2/13
to django-...@googlegroups.com
#680: get_absolute_url not being used correctly in admin interface?
-------------------------------+--------------------------------------
Reporter: malcolm@… | Owner: adrian
Type: Bug | Status: new
Component: contrib.admin | Version:
Severity: normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by cyogesh):

* status: closed => new
* resolution: fixed =>
* easy: => 0
* needs_docs: 0 => 1
* ui_ux: => 0
* type: defect => Bug


Comment:

Here is one of the problems of 'requiring' such a change. Don't make this
modification in urls and do the following:

1. Go to admin/sites/site/
2. change the domain and you will be redirected to the new mentioned
domain

However if you:

1. Go to admin/sites/site/
2. Delete the site mentioned there
3. Add a new site you want to be redirected to

There will be no change in link directed by 'View on site'.

I think if this modification is *required*, it should be (at-least)
documented.

--
Ticket URL: <https://code.djangoproject.com/ticket/680#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jun 2, 2013, 9:23:54 PM6/2/13
to django-...@googlegroups.com
#680: get_absolute_url not being used correctly in admin interface?
-------------------------------+--------------------------------------
Reporter: malcolm@… | Owner: adrian
Type: Bug | Status: closed
Component: contrib.admin | Version:
Severity: normal | Resolution: fixed

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by kmtracey):

* status: new => closed
* resolution: => fixed


Comment:

This ticket is 8 years old, a lot has changed since then. Needing to
include shortcut urls in your own url conf is not documented because it is
not required. (I assume you are not using pre-1.0 Django.) The admin
itself takes care to ensure there is a url pattern in place to handle the
r/<content_type_id>/<object_id> urls it generates for the "View on Site"
buttons. These requests are routed to the shortcut view noted here:

https://docs.djangoproject.com/en/1.5/ref/contrib/sites/#how-django-uses-
the-sites-framework

and implemented here:

https://github.com/django/django/blob/master/django/contrib/contenttypes/views.py#L9

It isn't entirely clear to me what you are expecting differs from what is
happening with respect to the "view on site" buttons, it's quite possible
that view doesn't do what you expecting. If there is a bug here, it most
likely needs its own bug to track it, with a current and complete
description of what is going wrong...linking some current oddness to an
eight-year-old ticket is just going to confuse things.

--
Ticket URL: <https://code.djangoproject.com/ticket/680#comment:3>

Reply all
Reply to author
Forward
0 new messages