ct_fk_field = 'entity_object_id'
model = Attribute
extra = 1
- classes = ('collapse-closed',)
+ template = 'admin/philo/edit_inline/tabular_collapse.html'
allow_add = True
ct_fk_field = 'entity_object_id'
model = Relationship
extra = 1
- classes = ('collapse-closed',)
+ template = 'admin/philo/edit_inline/tabular_collapse.html'
allow_add = True
def get_fieldsets(self, request, obj=None, **kwargs):
fieldsets = list(self.fieldsets)
if obj: # if no obj, creating a new page, thus no template set, thus no containers
- page = obj
- template = page.template
+ template = obj.template
+ if template.documentation:
+ fieldsets.append(('Template Documentation', {
+ 'description': template.documentation
+ }))
contentlet_containers, contentreference_containers = template.containers
for container_name in contentlet_containers:
fieldsets.append((('Container: %s' % container_name), {