do not chach site.json

This commit is contained in:
j 2011-01-14 14:32:48 +00:00
commit b73c86e5bf
7 changed files with 24 additions and 41 deletions

View file

@ -23,9 +23,10 @@ class SiteSettings(models.Model):
def __unicode__(self):
return self.key
with open(os.path.join(settings.PROJECT_ROOT, 'templates', 'site.json')) as f:
site_config = json.load(f)
site_config['keys'] = {}
for key in site_config['sortKeys']:
site_config['keys'][key['id']] = key
def site_config():
with open(os.path.join(settings.PROJECT_ROOT, 'templates', 'site.json')) as f:
site_config = json.load(f)
site_config['keys'] = {}
for key in site_config['sortKeys']:
site_config['keys'][key['id']] = key
return site_config