forked from github/pelican
Merge pull request #2439 from mosra/settings-paginated-templates-deprecation-fix
Fix PAGINATED_DIRECT_TEMPLATES backward compatibility handling to not crash
This commit is contained in:
commit
7f7448ef76
2 changed files with 30 additions and 0 deletions
|
|
@ -323,6 +323,11 @@ def handle_deprecated_settings(settings):
|
|||
'PAGINATED_DIRECT_TEMPLATES', 'PAGINATED_TEMPLATES')
|
||||
logger.warning(message)
|
||||
|
||||
# set PAGINATED_TEMPLATES
|
||||
if 'PAGINATED_TEMPLATES' not in settings:
|
||||
settings['PAGINATED_TEMPLATES'] = {
|
||||
'tag': None, 'category': None, 'author': None}
|
||||
|
||||
for t in settings['PAGINATED_DIRECT_TEMPLATES']:
|
||||
if t not in settings['PAGINATED_TEMPLATES']:
|
||||
settings['PAGINATED_TEMPLATES'][t] = None
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue