mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +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:
@@ -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])
|
||||
|
||||
Reference in New Issue
Block a user