forked from github/pelican
control pagination per template
This commit is contained in:
parent
76eebfe539
commit
62128fb948
8 changed files with 84 additions and 41 deletions
|
|
@ -66,13 +66,12 @@ class TestPage(unittest.TestCase):
|
|||
(1, '/{url}', '{base_name}/index.html'),
|
||||
(2, '/{url}{number}/', '{base_name}/{number}/index.html')
|
||||
]]
|
||||
settings['DEFAULT_PAGINATION'] = 1
|
||||
|
||||
self.page_kwargs['metadata']['author'] = Author('Blogger', settings)
|
||||
object_list = [Article(**self.page_kwargs),
|
||||
Article(**self.page_kwargs)]
|
||||
paginator = Paginator('blog/index.html', '//blog.my.site/',
|
||||
object_list, settings)
|
||||
object_list, settings, 1)
|
||||
page1 = paginator.page(1)
|
||||
self.assertEqual(page1.save_as, 'blog/index.html')
|
||||
self.assertEqual(page1.url, '//blog.my.site/')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue