X-Git-Url: http://git.ithinksw.org/philo.git/blobdiff_plain/d7d4d16a3aaf6d572e86c78b45d93b8bb065d23d..5b04fbdd85de1b641b58c50d605bd45f03ba3189:/admin/base.py diff --git a/admin/base.py b/admin/base.py index d9249e5..f4a5f2f 100644 --- a/admin/base.py +++ b/admin/base.py @@ -1,7 +1,7 @@ from django.contrib import admin from django.contrib.contenttypes import generic from philo.models import Tag, Attribute -from philo.forms import AttributeForm +from philo.forms import AttributeForm, AttributeInlineFormSet COLLAPSE_CLASSES = ('collapse', 'collapse-closed', 'closed',) @@ -16,6 +16,7 @@ class AttributeInline(generic.GenericTabularInline): allow_add = True classes = COLLAPSE_CLASSES form = AttributeForm + formset = AttributeInlineFormSet exclude = ['value_object_id'] @@ -27,5 +28,6 @@ class EntityAdmin(admin.ModelAdmin): class TagAdmin(admin.ModelAdmin): list_display = ('name', 'slug') prepopulated_fields = {"slug": ("name",)} + search_fields = ["name"] admin.site.register(Tag, TagAdmin) \ No newline at end of file