# Import two helper functions and two admin models to inherit our custom model from.fromsitetree.adminimportTreeItemAdmin,TreeAdmin,override_tree_admin,override_item_admin# This is our custom tree admin model.classCustomTreeAdmin(TreeAdmin):exclude=('title',)# Here we exclude `title` field from form.# And our custom tree item admin model.classCustomTreeItemAdmin(TreeItemAdmin):# That will turn a tree item representation from the default variant# with collapsible groupings into a flat one.fieldsets=None# Now we tell the SiteTree to replace generic representations with custom.override_tree_admin(CustomTreeAdmin)override_item_admin(CustomTreeItemAdmin)
Note
You might also be interested in using custom tree handler.
According to django-seo documentation it allows an addition of custom metadata fields to your models,
so we use it to connect metadata to sitetree items.
That's how one might render django-seo inline form on sitetree item create and edit pages: