X-Git-Url: http://git.ithinksw.org/philo.git/blobdiff_plain/d8ba4e197c35a8e30f10112fcf53740e0711dc98..2a1082fb32ede39a2bd39a3de243adc882a72b83:/admin/base.py?ds=inline 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",)}