|
@@ -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
|
|
|
- http://docs.wagtail.io/en/latest/reference/pages/model_recipes.html
|
|
|
+ https://docs.wagtail.io/en/latest/reference/pages/model_recipes.html
|
|
|
"""
|
|
|
content_object = ParentalKey('BlogPage', related_name='tagged_items', on_delete=models.CASCADE)
|
|
|
|
|
@@ -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):
|