[Django] 17 - Add Tags to Pages

本篇,计划针对 [Django] 10 - Routable Pages & Sitemaps of Wagtail,讨论下 “页码和分类” 同时显示的问题。

 

Todo list.

 

 

from modelcluster.contrib.taggit import ClusterTaggableManager
from taggit.models               import TaggedItemBase

 

class BlogPageTag(TaggedItemBase):
    content_object = ParentalKey(
        'BlogDetailPage',
        related_name='tagged_items',
        on_delete=models.CASCADE,
    )

 

 https://bitbucket.org/jeffrey_hoa/learn-wagtail/commits/8d4240096482baa207ca7bef31bf5f8aed263f19

 

 

/* contnue */ 

 

 

 

posted @ 2021-01-04 20:47  郝壹贰叁  阅读(73)  评论(0编辑  收藏  举报