django-orchestra/orchestra/contrib/databases/settings.py
2015-04-27 14:54:17 +00:00

25 lines
506 B
Python

from orchestra.core.validators import validate_hostname
from orchestra.settings import Setting
DATABASES_TYPE_CHOICES = Setting('DATABASES_TYPE_CHOICES',
(
('mysql', 'MySQL'),
('postgres', 'PostgreSQL'),
),
validators=[Setting.validate_choices]
)
DATABASES_DEFAULT_TYPE = Setting('DATABASES_DEFAULT_TYPE',
'mysql',
choices=DATABASES_TYPE_CHOICES,
)
DATABASES_DEFAULT_HOST = Setting('DATABASES_DEFAULT_HOST',
'localhost',
validators=[validate_hostname],
)