Scaffold containerized Django/Wagtail app with core features
This commit is contained in:
15
apps/authors/wagtail_hooks.py
Normal file
15
apps/authors/wagtail_hooks.py
Normal file
@@ -0,0 +1,15 @@
|
||||
from wagtail.snippets.models import register_snippet
|
||||
from wagtail.snippets.views.snippets import SnippetViewSet
|
||||
|
||||
from apps.authors.models import Author
|
||||
|
||||
|
||||
class AuthorViewSet(SnippetViewSet):
|
||||
model = Author
|
||||
icon = "user"
|
||||
list_display = ["name", "slug"]
|
||||
search_fields = ["name"]
|
||||
add_to_admin_menu = True
|
||||
|
||||
|
||||
register_snippet(AuthorViewSet)
|
||||
Reference in New Issue
Block a user