mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Fix Issue #1165 allows extensions to be set by certain settings
PAGINATION_PATTERNS was hard coded so that all files had a ".html" extension. This fixes that and add a test to ensure that the pagination code is not changing the filename incorrectly.
This commit is contained in:
parent
d9bbdf7f07
commit
990ddb5a5e
4 changed files with 54 additions and 4 deletions
|
|
@ -69,7 +69,7 @@ class Paginator(object):
|
|||
|
||||
class Page(object):
|
||||
def __init__(self, name, object_list, number, paginator, settings):
|
||||
self.name = name
|
||||
self.name, self.extension = os.path.splitext(name)
|
||||
self.object_list = object_list
|
||||
self.number = number
|
||||
self.paginator = paginator
|
||||
|
|
@ -143,6 +143,7 @@ class Page(object):
|
|||
'settings': self.settings,
|
||||
'base_name': os.path.dirname(self.name),
|
||||
'number_sep': '/',
|
||||
'extension': self.extension,
|
||||
}
|
||||
|
||||
if self.number == 1:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue