I am trying to understand 'view on site' functionality. From what I
read it is supposed to use model's get_absolute_url() to create 'view
on site' link. However, when I look at Django-1.2.5/django/contrib/
admin/templates/admin/change_form.html code:

  <ul class="object-tools"><li><a href="history/"
class="historylink">{% trans "History" %}</a></li>
  {% if has_absolute_url %}<li><a href="../../../r/
{{ content_type_id }}/{{ object_id }}/" class="viewsitelink">{% trans
"View on site" %}</a></li>{% endif%}
  </ul>

It doesn't use it to create the link. What is '../../../r/
{{ content_type_id }}/{{ object_id }}/' in the code above? Why is it
creating link using content type? Why doesn't it use get_absolute_url
to fetch the URL?

Thanks,

T.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" 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-users?hl=en.

Reply via email to