1
0
mirror of https://github.com/django/django.git synced 2025-07-04 09:49:12 +00:00

newforms-admin: Added show_url attribute to InlineAdminForm for deciding whether we can show a 'display on site' link.

git-svn-id: http://code.djangoproject.com/svn/django/branches/newforms-admin@6105 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Joseph Kocherhans 2007-09-12 02:23:59 +00:00
parent dae251584e
commit fa71790668

View File

@ -761,6 +761,7 @@ class InlineAdminForm(AdminForm):
def __init__(self, formset, form, fieldsets, prepopulated_fields, original):
self.formset = formset
self.original = original
self.show_url = original and hasattr(original, 'get_absolute_url')
super(InlineAdminForm, self).__init__(form, fieldsets, prepopulated_fields)
def pk_field(self):