Merge pull request #1164 from framasoft/fix-custom-templates-settings

🐛 — Fix UMAP_CUSTOM_TEMPLATES setting
This commit is contained in:
David Larlet 2023-06-23 10:16:53 -04:00 committed by GitHub
commit 06cdb55a6c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -39,7 +39,10 @@ if path:
# Retrocompat pre 1.0, remove me in 1.1.
globals()['UMAP' + key[15:]] = value
elif key == 'UMAP_CUSTOM_TEMPLATES':
if 'DIRS' in globals()['TEMPLATES'][0]:
globals()['TEMPLATES'][0]['DIRS'].insert(0, value)
else:
globals()['TEMPLATES'][0]['DIRS'] = [value]
elif key == 'UMAP_CUSTOM_STATICS':
globals()['STATICFILES_DIRS'].insert(0, value)
else: