1
0
mirror of https://github.com/django/django.git synced 2025-10-25 06:36:07 +00:00

[1.1.X] Fixed #12561. InlineAdmin now respects can_delete=False. Backport of [12533] from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.1.X@12534 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Joseph Kocherhans
2010-02-23 17:26:20 +00:00
parent c7117b103a
commit 6510822679
9 changed files with 94 additions and 4 deletions

View File

@@ -72,3 +72,15 @@ class MediaExcludeInline(generic.GenericTabularInline):
admin.site.register(EpisodeExclude, inlines=[MediaExcludeInline])
#
# 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])