Add category taxonomy and navigation integration
Implements Issue #35 with category snippets, article category routing, category-aware templates, and category RSS feeds with tests. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
from wagtail.snippets.models import register_snippet
|
||||
from wagtail.snippets.views.snippets import SnippetViewSet
|
||||
|
||||
from apps.blog.models import TagMetadata
|
||||
from apps.blog.models import Category, TagMetadata
|
||||
|
||||
|
||||
class TagMetadataViewSet(SnippetViewSet):
|
||||
@@ -11,3 +11,14 @@ class TagMetadataViewSet(SnippetViewSet):
|
||||
|
||||
|
||||
register_snippet(TagMetadataViewSet)
|
||||
|
||||
|
||||
class CategoryViewSet(SnippetViewSet):
|
||||
model = Category
|
||||
icon = "folder-open-inverse"
|
||||
list_display = ["name", "slug", "show_in_nav", "sort_order"]
|
||||
list_filter = ["show_in_nav"]
|
||||
ordering = ["sort_order", "name"]
|
||||
|
||||
|
||||
register_snippet(CategoryViewSet)
|
||||
|
||||
Reference in New Issue
Block a user