git.ithinksw.org
/
philo.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Shunted the responsibility in Entity proxy models for setting an Attribute's value...
[philo.git]
/
admin
/
base.py
diff --git
a/admin/base.py
b/admin/base.py
index
d9249e5
..
f4a5f2f
100644
(file)
--- 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 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',)
COLLAPSE_CLASSES = ('collapse', 'collapse-closed', 'closed',)
@@
-16,6
+16,7
@@
class AttributeInline(generic.GenericTabularInline):
allow_add = True
classes = COLLAPSE_CLASSES
form = AttributeForm
allow_add = True
classes = COLLAPSE_CLASSES
form = AttributeForm
+ formset = AttributeInlineFormSet
exclude = ['value_object_id']
exclude = ['value_object_id']
@@
-27,5
+28,6
@@
class EntityAdmin(admin.ModelAdmin):
class TagAdmin(admin.ModelAdmin):
list_display = ('name', 'slug')
prepopulated_fields = {"slug": ("name",)}
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
admin.site.register(Tag, TagAdmin)
\ No newline at end of file