|
@@ -43,7 +43,7 @@ class BlogPageTag(TaggedItemBase):
|
|
|
"""
|
|
|
This model allows us to create a many-to-many relationship between
|
|
|
the BlogPage object and tags. There's a longer guide on using it at
|
|
|
- https://docs.wagtail.io/en/latest/reference/pages/model_recipes.html
|
|
|
+ https://docs.wagtail.org/en/stable/reference/pages/model_recipes.html
|
|
|
"""
|
|
|
content_object = ParentalKey('BlogPage', related_name='tagged_items', on_delete=models.CASCADE)
|
|
|
|
|
@@ -54,7 +54,7 @@ class BlogPage(Page):
|
|
|
|
|
|
We access the People object with an inline panel that references the
|
|
|
ParentalKey's related_name in BlogPeopleRelationship. More docs:
|
|
|
- https://docs.wagtail.io/en/latest/topics/pages.html
|
|
|
+ https://docs.wagtail.org/en/stable/topics/pages.html
|
|
|
"""
|
|
|
introduction = models.TextField(
|
|
|
help_text='Text to describe the page',
|
|
@@ -166,7 +166,7 @@ class BlogIndexPage(RoutablePageMixin, Page):
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
+
|
|
|
def get_context(self, request):
|
|
|
context = super(BlogIndexPage, self).get_context(request)
|
|
|
context['posts'] = BlogPage.objects.descendant_of(
|
|
@@ -177,7 +177,7 @@ class BlogIndexPage(RoutablePageMixin, Page):
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
+
|
|
|
@route(r'^tags/$', name='tag_archive')
|
|
|
@route(r'^tags/([\w-]+)/$', name='tag_archive')
|
|
|
def tag_archive(self, request, tag=None):
|