Here are the examples of the python api django.conf.settings.PROMGEN taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
1 Examples
0
View Complete Implementation : util.py
Copyright MIT License
Author : line
Copyright MIT License
Author : line
def setting(key, default=None, domain=None):
"""
Settings helper based on saltstack's query
Allows a simple way to query settings from YAML
using the style `path:to:key` to represent
path:
to:
key: value
"""
rtn = settings.PROMGEN
if domain:
rtn = rtn[domain]
for index in key.split(":"):
try:
rtn = rtn[index]
except KeyError:
return default
return rtn