from validators import TreeParentValidator, TreePositionValidator
+COLLAPSE_CLASSES = ('collapse', 'collapse-closed', 'closed',)
+
+
class AttributeInline(generic.GenericTabularInline):
ct_field = 'entity_content_type'
ct_fk_field = 'entity_object_id'
fk_name = 'collection'
model = CollectionMember
extra = 1
- classes = ('collapse-closed',)
+ classes = COLLAPSE_CLASSES
allow_add = True
fields = ('member_content_type', 'member_object_id', 'index',)
'fields': ('parent', 'name', 'slug')
}),
('Documentation', {
- 'classes': ('collapse', 'collapse-closed'),
+ 'classes': COLLAPSE_CLASSES,
'fields': ('documentation',)
}),
(None, {
'fields': ('code',)
}),
('Advanced', {
- 'classes': ('collapse','collapse-closed'),
+ 'classes': COLLAPSE_CLASSES,
'fields': ('mimetype',)
}),
)
'fields': ('slug', 'target', 'status_code')
}),
('URL/Tree/Hierarchy', {
- 'classes': ('collapse', 'collapse-closed'),
+ 'classes': COLLAPSE_CLASSES,
'fields': ('parent',)
}),
)
'fields': ('file', 'slug', 'mimetype')
}),
('URL/Tree/Hierarchy', {
- 'classes': ('collapse', 'collapse-closed'),
+ 'classes': COLLAPSE_CLASSES,
'fields': ('parent',)
}),
)
'fields': ('title', 'slug', 'template')
}),
('URL/Tree/Hierarchy', {
- 'classes': ('collapse', 'collapse-closed'),
+ 'classes': COLLAPSE_CLASSES,
'fields': ('parent',)
}),
)