itemKey, use SITE_CONFIG to define json config
This commit is contained in:
parent
0febdc53b1
commit
4a8828a817
7 changed files with 427 additions and 82 deletions
|
|
@ -25,10 +25,10 @@ class SiteSettings(models.Model):
|
|||
return self.key
|
||||
|
||||
def site_config():
|
||||
with open(os.path.join(settings.PROJECT_ROOT, 'templates', 'site.json')) as f:
|
||||
with open(settings.SITE_CONFIG) as f:
|
||||
site_config = json.load(f)
|
||||
site_config['keys'] = {}
|
||||
for key in site_config['sortKeys']:
|
||||
for key in site_config['itemKeys']:
|
||||
site_config['keys'][key['id']] = key
|
||||
site_config['_findKeys'] = {}
|
||||
for key in site_config['findKeys']:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue