Reputation: 3699
I am running Wagtail v2.8 and I want to use snippets. The documentation says
You can access the Snippets menu by clicking on the ‘Snippets’ link in the left-hand menu bar.
Mine shows no 'Snippets' items. I have
INSTALLED_APPS = [
...
'wagtail.snippets',
...]
What do I need to do?
Upvotes: 1
Views: 583
Reputation: 3108
You need to register a model as a snippet using @register_snippet
. If you ForeignKey
to a Django model and need to choose it in the Wagtail admin, you can use SnippetChooserPanel
in your content_panels
or panels
definition: https://docs.wagtail.io/en/latest/reference/pages/panels.html#module-wagtail.snippets.edit_handlers
Depending on what you need to do, you might find that using a site setting is more appropriate.
Upvotes: 3