mirror of
https://github.com/django/django.git
synced 2025-09-26 12:09:19 +00:00
Fixed #12561. InlineAdmin now respects can_delete=False. Thanks, nessita.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12533 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
10b1871441
commit
f2d5582c53
9 changed files with 95 additions and 4 deletions
|
@ -93,3 +93,16 @@ class PhoneNumberInline(generic.GenericTabularInline):
|
|||
model = PhoneNumber
|
||||
|
||||
admin.site.register(Contact, inlines=[PhoneNumberInline])
|
||||
|
||||
#
|
||||
# Generic inline with can_delete=False
|
||||
#
|
||||
|
||||
class EpisodePermanent(Episode):
|
||||
pass
|
||||
|
||||
class MediaPermanentInline(generic.GenericTabularInline):
|
||||
model = Media
|
||||
can_delete = False
|
||||
|
||||
admin.site.register(EpisodePermanent, inlines=[MediaPermanentInline])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue