Commits

Luke Plant committed b5f3e58

Added inline editing of CssClass in CssClassCategory

Change from Daniele

  • Participants
  • Parent commits f3bf3a2

Comments (0)

Files changed (1)

File semanticeditor/admin.py

 from django.contrib import admin
 from semanticeditor.models import CssClass, CssClassCategory
 
+class CssClassAdminInline(admin.StackedInline):
+    model = CssClass
+    extra = 0
+    fieldsets = (
+        (None, {
+            'fields': (
+                ('name', 'verbose_name'),
+                ('description', 'templates',),
+                ('allowed_elements', 'column_equiv'),
+            ),
+        }),
+    )
 
 class CssClassAdmin(admin.ModelAdmin):
     list_display = ('verbose_name', 'name', 'category')
 
-
+class CssClassCategoryAdmin(admin.ModelAdmin):
+    inlines = [CssClassAdminInline,]
+    
 admin.site.register(CssClass, CssClassAdmin)
-admin.site.register(CssClassCategory)
+admin.site.register(CssClassCategory, CssClassCategoryAdmin)