chiark / gitweb /
oelican-theme: avoid using deprecated PAGINATED_DIRECT_TEMPLATES.
authorVladimír Vondruš <mosra@centrum.cz>
Fri, 29 Mar 2019 10:24:39 +0000 (11:24 +0100)
committerVladimír Vondruš <mosra@centrum.cz>
Fri, 29 Mar 2019 12:44:31 +0000 (13:44 +0100)
doc/pelican/theme.rst
pelican-theme/test/test_blog.py

index 36c5de5af0e6a6a497e0ecc40753b23005e7f745..54aad04dbdd0afc584a0ab8d4ee5772441480b91 100644 (file)
@@ -790,8 +790,8 @@ pagination for the archives, as that's not enabled by default:
     # Defaults to ['index', 'categories', 'authors', 'archives']
     DIRECT_TEMPLATES = ['archives']
 
-    # Defaults to ['index']
-    PAGINATED_DIRECT_TEMPLATES = ['archives']
+    # Defaults to {'index': None, 'tag': None, 'category': None, 'author': None}
+    PAGINATED_TEMPLATES = {'archives': None, 'tag': None, 'category': None, 'author': None}
 
 .. note-warning::
 
index f9d2dd16431cca02507db32a977cb00c388d8a42..605ee802ef93ed52ea6fbcb4b4fab07cef7e4f5b 100644 (file)
@@ -130,7 +130,7 @@ class Pagination(BlogTestCase):
                 [(1, 'index.html', '{name}.html'),
                  (2, 'index{number}.html', '{name}{number}.html')],
             'DIRECT_TEMPLATES': ['index', 'archives'],
-            'PAGINATED_DIRECT_TEMPLATES': ['index', 'archives'],
+            'PAGINATED_TEMPLATES': {'index': None, 'archives': None, 'tag': None, 'category': None, 'author': None},
 
             # verify that og:url doesn't take pagination into account
             'M_DISABLE_SOCIAL_META_TAGS': False
@@ -171,7 +171,7 @@ class PaginationDisabled(BlogTestCase):
     def test(self):
         self.run_pelican({
             'DEFAULT_PAGINATION': 1,
-            'PAGINATED_DIRECT_TEMPLATES': []
+            'PAGINATED_TEMPLATES': {'tag': None, 'category': None, 'author': None}
         })
 
         # Nothing is paginated
@@ -462,7 +462,7 @@ class HtmlEscape(BlogTestCase):
                 [(1, 'index.html?and&in&url=""', '{name}.html'),
                  (2, 'index{number}.html?and&in&url=""', '{name}{number}.html')],
             'DIRECT_TEMPLATES': ['index', 'archives'],
-            'PAGINATED_DIRECT_TEMPLATES': ['index', 'archives'],
+            'PAGINATED_TEMPLATES': {'index': None, 'archives': None, 'tag': None, 'category': None, 'author': None},
             'FORMATTED_FIELDS': ['summary', 'description']
         })