X-Git-Url: http://git.ithinksw.org/philo.git/blobdiff_plain/05bdd3ca32b67c218f7d58c2def2661867b4d1fa..fbe780ee3c39c4feea456aa9d36c89467900191c:/admin/base.py diff --git a/admin/base.py b/admin/base.py index 0413dde..acba9c3 100644 --- a/admin/base.py +++ b/admin/base.py @@ -5,8 +5,9 @@ from django.http import HttpResponse from django.utils import simplejson as json from django.utils.html import escape from philo.models import Tag, Attribute -from philo.forms import AttributeForm, AttributeInlineFormSet +from philo.admin.forms.attributes 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",)}