[django/django] fd219f: Fixed #8261 -- ModelAdmin hook for customising the...

3 views
Skip to first unread message

GitHub

unread,
Oct 29, 2013, 5:10:48 PM10/29/13
to django-...@googlegroups.com
Branch: refs/heads/master
Home: https://github.com/django/django
Commit: fd219fa24c7911adab60e1f5e4fd3d7f9d82a969
https://github.com/django/django/commit/fd219fa24c7911adab60e1f5e4fd3d7f9d82a969
Author: Unai Zalakain <un...@gisa-elkartea.org>
Date: 2013-10-29 (Tue, 29 Oct 2013)

Changed paths:
M django/contrib/admin/helpers.py
M django/contrib/admin/options.py
M django/contrib/admin/templates/admin/change_form.html
M django/contrib/admin/templates/admin/edit_inline/stacked.html
M django/contrib/admin/templates/admin/edit_inline/tabular.html
M django/contrib/admin/validation.py
M docs/ref/contrib/admin/index.txt
M docs/releases/1.7.txt
M tests/admin_views/admin.py
A tests/admin_views/fixtures/admin-views-restaurants.xml
M tests/admin_views/models.py
M tests/admin_views/tests.py

Log Message:
-----------
Fixed #8261 -- ModelAdmin hook for customising the "show on site" button

``ModelAdmin.view_on_site`` defines wether to show a link to the object on the
admin detail page. If ``True``, cleverness (i.e. ``Model.get_absolute_url``) is
used to get the url. If it's a callable, the callable is called with the object
as the only parameter. If ``False``, not link is displayed.

With the aim of maitaining backwards compatibility, ``True`` is the default.



Reply all
Reply to author
Forward
0 new messages