Optimize templates & clean code
This commit is contained in:
parent
0c1c888547
commit
86d9ca5066
11 changed files with 98 additions and 48 deletions
|
@ -13,9 +13,8 @@ def site_config(request):
|
|||
try:
|
||||
with open(config_path, 'r') as f:
|
||||
config = json.load(f)
|
||||
cache.set('site_config', config, 3600)
|
||||
cache.set('site_config', config, 3600)
|
||||
except FileNotFoundError:
|
||||
config = {}
|
||||
|
||||
return {'site_config': config}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue