mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Replace settings.get(key) with settings[key] for default settings
If a setting exists in DEFAULT_CONFIG, assume it will be there (instead of checking and/or providing a local default). The earlier code was split between the two idioms, which was confusing.
This commit is contained in:
parent
c8e7d95b34
commit
8ff34e6c5d
8 changed files with 35 additions and 38 deletions
|
|
@ -155,10 +155,10 @@ class Writer(object):
|
|||
for key in paginated.keys():
|
||||
object_list = paginated[key]
|
||||
|
||||
if self.settings.get('DEFAULT_PAGINATION'):
|
||||
if self.settings['DEFAULT_PAGINATION']:
|
||||
paginators[key] = Paginator(object_list,
|
||||
self.settings.get('DEFAULT_PAGINATION'),
|
||||
self.settings.get('DEFAULT_ORPHANS'))
|
||||
self.settings['DEFAULT_PAGINATION'],
|
||||
self.settings['DEFAULT_ORPHANS'])
|
||||
else:
|
||||
paginators[key] = Paginator(object_list, len(object_list))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue