X-Git-Url: http://git.ithinksw.org/philo.git/blobdiff_plain/05bdd3ca32b67c218f7d58c2def2661867b4d1fa..72849b1c135de8c0ad14d2ca881a98fdea279859:/admin/base.py?ds=sidebyside diff --git a/admin/base.py b/admin/base.py index 0413dde..0d35cf6 100644 --- a/admin/base.py +++ b/admin/base.py @@ -7,6 +7,7 @@ from django.utils.html import escape from philo.models import Tag, Attribute from philo.forms import AttributeForm, AttributeInlineFormSet from philo.admin.widgets import TagFilteredSelectMultiple +from mptt.admin import MPTTModelAdmin COLLAPSE_CLASSES = ('collapse', 'collapse-closed', 'closed',) @@ -33,6 +34,14 @@ class EntityAdmin(admin.ModelAdmin): save_on_top = True +class TreeAdmin(MPTTModelAdmin): + pass + + +class TreeEntityAdmin(TreeAdmin, EntityAdmin): + pass + + class TagAdmin(admin.ModelAdmin): list_display = ('name', 'slug') prepopulated_fields = {"slug": ("name",)}