Skip to content

Commit

Permalink
[refs #90567] Fix fetchtemplates command errors
Browse files Browse the repository at this point in the history
  • Loading branch information
dianaboiangiu committed Jan 25, 2018
1 parent 915d91e commit 11de47c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion gemet/thesaurus/management/commands/fetchtemplates.py
@@ -1,3 +1,4 @@
import logging
import os
import requests

Expand Down Expand Up @@ -31,7 +32,8 @@ def handle(self, *args, **options):
'header_before_title_cached.html',
'header_after_title_cached.html',
'header_before_login_cached.html',
'header_after_login_cached.html'
'header_after_login_cached.html',
'footer_cached.html',
]

try:
Expand Down Expand Up @@ -73,6 +75,8 @@ def handle(self, *args, **options):
for template, file_name in zip(files, header_files):
with open(os.path.join(zope_path, file_name)) as f:
templates[template] = f.read()
logger = logging.getLogger('django')
logger.info('Zope templates were taken from cache.')

for template_name, content in templates.iteritems():
template_path = os.path.join(zope_path, template_name)
Expand Down

0 comments on commit 11de47c

Please sign in to comment.