Permalink
Browse files

improved admin with inlining

git-svn-id: http://django-flag.googlecode.com/svn/trunk@25 6223c904-8705-11dd-a5c9-f1483cedc3eb
  • Loading branch information...
1 parent 36b64b1 commit 70701c23b4b704f9e4e208507c9e1d8a90e88060 @jtauber jtauber committed Sep 20, 2008
Showing with 8 additions and 2 deletions.
  1. +8 −2 flag/admin.py
View
@@ -1,5 +1,11 @@
from django.contrib import admin
from flag.models import FlaggedContent, FlagInstance
-admin.site.register(FlaggedContent)
-admin.site.register(FlagInstance)
+class InlineFlagInstance(admin.TabularInline):
+ model = FlagInstance
+ extra = 0
+
+class FlaggedContentAdmin(admin.ModelAdmin):
+ inlines = [InlineFlagInstance]
+
+admin.site.register(FlaggedContent, FlaggedContentAdmin)

0 comments on commit 70701c2

Please sign in to comment.