Hi,

I'm having a problem with the Admin "View on site" button. According
to http://www.djangoproject.com/documentation/model_api/#get-absolute-url
all I need to do is add a get_absolute_url() method to my model
objects and the admin interface will gain a "View on site" button that
links to my application's view of the object.

My model objects have a get_absolute_url() method, and the View on
site button appears as expected, however, the "View on site" button
links to strange relative urls like "../../../r/10003".

I dug around a little. The change_form.html template contains this code:

{% if has_absolute_url %}<li><a href="../../../r/{{ content_type_id
}}/{{ object_id }}/" class="viewsitelink">{% trans "View on site"
%}</a></li>{% endif%}

This looks like a bug with some history. What is going on here?

Alan.
-- 
Alan Green
[EMAIL PROTECTED] - http://bright-green.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" 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-developers
-~----------~----~----~----~------~----~------~--~---

Reply via email to