X-Git-Url: http://git.ithinksw.org/philo.git/blobdiff_plain/beb034eda30e8af8a169c4d43c5aba83812337e4..fea69c17983d2850352261760be568e792621013:/admin/base.py 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",)}