ソースを参照

Add support for tags with multiple words

Fixes issue where `my-blog/tags/multi-word-tag` would result in a 404, even if there was a valid tag slug for `mult-word-tag`
LB (Ben Johnston) 7 年 前
コミット
02710075ae
1 ファイル変更1 行追加1 行削除
  1. 1 1
      bakerydemo/blog/models.py

+ 1 - 1
bakerydemo/blog/models.py

@@ -179,7 +179,7 @@ class BlogIndexPage(RoutablePageMixin, Page):
     # More information on RoutablePages is at
     # http://docs.wagtail.io/en/latest/reference/contrib/routablepage.html
     @route('^tags/$', name='tag_archive')
-    @route('^tags/(\w+)/$', name='tag_archive')
+    @route('^tags/([\w-]+)/$', name='tag_archive')
     def tag_archive(self, request, tag=None):
 
         try: