mirror of
https://github.com/kennethreitz-archive/chishop.git
synced 2026-06-21 16:00:58 +00:00
91631a0837
roles.
17 lines
504 B
Python
17 lines
504 B
Python
from django.conf import settings
|
|
|
|
|
|
_PREFICES = ("PYPI", "DJANGOPYPI")
|
|
|
|
def get_setting(name, default=None):
|
|
for prefix in _PREFICES:
|
|
fq = "_".join([prefix, name])
|
|
if hasattr(settings, fq):
|
|
return getattr(settings, fq)
|
|
return default
|
|
|
|
ROLES = get_setting("ROLES", {"default": ()})
|
|
DEFAULT_ROLE = get_setting("DEFAULT_ROLE", "default")
|
|
RELEASE_UPLOAD_TO = get_setting("RELEASE_UPLOAD_TO", "dists")
|
|
ALLOW_VERSION_OVERWRITE = get_setting("ALLOW_VERSION_OVERWRITE", False)
|