django-orchestra/orchestra/settings.py

82 lines
2 KiB
Python
Raw Normal View History

2015-04-27 14:54:17 +00:00
from django.core.validators import validate_email
2014-05-08 16:59:35 +00:00
from django.utils.translation import ugettext_lazy as _
2015-05-04 19:52:53 +00:00
from orchestra.contrib.settings import Setting
2015-05-03 17:44:46 +00:00
2015-04-26 13:53:00 +00:00
ORCHESTRA_BASE_DOMAIN = Setting('ORCHESTRA_BASE_DOMAIN',
'orchestra.lan',
help_text=("Base domain name used for other settings.<br>"
"If you're editing the settings via the admin interface <b>it is advisable to "
"commit this change before changing any other variables which could be affected</b>.")
)
2015-04-26 13:53:00 +00:00
ORCHESTRA_SITE_URL = Setting('ORCHESTRA_SITE_URL',
'https://orchestra.%s' % ORCHESTRA_BASE_DOMAIN,
2015-04-26 13:53:00 +00:00
help_text=_("Domain name used when it will not be possible to infere the domain from a request."
2015-04-27 14:54:17 +00:00
"For example in periodic tasks.<br>"
"Uses <tt>ORCHESTRA_BASE_DOMAIN</tt> by default.")
)
2014-05-08 16:59:35 +00:00
ORCHESTRA_SITE_NAME = Setting('ORCHESTRA_SITE_NAME',
'orchestra',
)
2014-05-08 16:59:35 +00:00
2015-04-26 13:53:00 +00:00
ORCHESTRA_SITE_VERBOSE_NAME = Setting('ORCHESTRA_SITE_VERBOSE_NAME',
2015-04-27 14:54:17 +00:00
"%s Hosting Management" % ORCHESTRA_SITE_NAME.capitalize(),
help_text="Uses <tt>ORCHESTRA_SITE_NAME</tt> by default."
)
2014-05-08 16:59:35 +00:00
2015-04-26 13:53:00 +00:00
2014-05-08 16:59:35 +00:00
# Service management commands
ORCHESTRA_START_SERVICES = Setting('ORCHESTRA_START_SERVICES',
default=(
'postgresql',
'celeryevcam',
'celeryd',
'celerybeat',
('uwsgi', 'nginx'),
),
)
2014-05-08 16:59:35 +00:00
ORCHESTRA_RESTART_SERVICES = Setting('ORCHESTRA_RESTART_SERVICES',
default=(
'celeryd',
'celerybeat',
'uwsgi'
),
)
2014-05-08 16:59:35 +00:00
ORCHESTRA_STOP_SERVICES = Setting('ORCHESTRA_STOP_SERVICES',
default=(
('uwsgi', 'nginx'),
'celerybeat',
'celeryd',
'celeryevcam',
'postgresql'
),
)
2014-05-13 13:46:40 +00:00
2015-04-26 13:53:00 +00:00
ORCHESTRA_API_ROOT_VIEW = Setting('ORCHESTRA_API_ROOT_VIEW',
'orchestra.api.root.APIRoot'
)
2014-10-24 10:16:46 +00:00
2015-04-26 13:53:00 +00:00
ORCHESTRA_DEFAULT_SUPPORT_FROM_EMAIL = Setting('ORCHESTRA_DEFAULT_SUPPORT_FROM_EMAIL',
2015-04-27 14:54:17 +00:00
'support@{}'.format(ORCHESTRA_BASE_DOMAIN),
validators=[validate_email],
help_text="Uses <tt>ORCHESTRA_BASE_DOMAIN</tt> by default."
)
2015-04-26 13:53:00 +00:00
ORCHESTRA_EDIT_SETTINGS = Setting('ORCHESTRA_EDIT_SETTINGS',
True
)