Admin classes (feincms3.admin
)#
- class feincms3.admin.AncestorFilter(request, params, model, model_admin)[source]#
Only show the subtree of an ancestor
By default, the first two levels are shown in the
list_filter
sidebar. This can be changed by setting themax_depth
class attribute to a different value.Usage:
class NodeAdmin(TreeAdmin): list_display = ("indented_title", "move_column", ...) list_filter = ("is_active", AncestorFilter, ...) admin.site.register(Node, NodeAdmin)
- class feincms3.admin.CloneForm(*args, **kwargs)[source]#
- clean()[source]#
Hook for doing any extra form-wide cleaning after Field.clean() has been called on every field. Any ValidationError raised by this method will not be associated with a particular field; it will have a special-case association with the field named ‘__all__’.
- property media#
Return all media required to render the widgets on this form.
- class feincms3.admin.MoveForm(*args, **kwargs)[source]#
Allows making the node the left or right sibling or the first or last child of another node.
Requires the node to be moved as
obj
keyword argument.- clean()[source]#
Hook for doing any extra form-wide cleaning after Field.clean() has been called on every field. Any ValidationError raised by this method will not be associated with a particular field; it will have a special-case association with the field named ‘__all__’.
- property media#
Return all media required to render the widgets on this form.
- class feincms3.admin.TreeAdmin(model, admin_site)[source]#
ModelAdmin
subclass for managing models using django-tree-queries trees.Shows the tree’s hierarchy and adds a view to move nodes around. To use this class the two columns
indented_title
andmove_column
should be added to subclasseslist_display
:class NodeAdmin(TreeAdmin): list_display = ("indented_title", "move_column", ...) admin.site.register(Node, NodeAdmin)
- get_queryset(request)[source]#
Return a QuerySet of all model instances that can be edited by the admin site. This is used by changelist_view.