From d26ea3e475103ba0c94e49fbbbc1ee88ad8a96ff Mon Sep 17 00:00:00 2001 From: Joseph Spiros Date: Wed, 16 Jun 2010 09:43:01 -0400 Subject: [PATCH] Making Attribute and Relationship inlines collapsible with custom template. --- admin.py | 4 +- .../philo/edit_inline/tabular_collapse.html | 125 ++++++++++++++++++ 2 files changed, 127 insertions(+), 2 deletions(-) create mode 100644 templates/admin/philo/edit_inline/tabular_collapse.html diff --git a/admin.py b/admin.py index e9a59ad..1a9125e 100644 --- a/admin.py +++ b/admin.py @@ -15,7 +15,7 @@ class AttributeInline(generic.GenericTabularInline): ct_fk_field = 'entity_object_id' model = Attribute extra = 1 - classes = ('collapse-closed',) + template = 'admin/philo/edit_inline/tabular_collapse.html' allow_add = True @@ -24,7 +24,7 @@ class RelationshipInline(generic.GenericTabularInline): ct_fk_field = 'entity_object_id' model = Relationship extra = 1 - classes = ('collapse-closed',) + template = 'admin/philo/edit_inline/tabular_collapse.html' allow_add = True diff --git a/templates/admin/philo/edit_inline/tabular_collapse.html b/templates/admin/philo/edit_inline/tabular_collapse.html new file mode 100644 index 0000000..c457297 --- /dev/null +++ b/templates/admin/philo/edit_inline/tabular_collapse.html @@ -0,0 +1,125 @@ +{% load i18n adminmedia %} +
+ +
+ + -- 2.20.1