builds: make latest and stable constants overridable
Makes the constants overridable from settings so that downstream
can use different ones.
from __future__ import absolute_import
from django.utils.translation import ugettext_lazy as _
+from django.conf import settings
BUILD_STATE_TRIGGERED = 'triggered'
BUILD_STATE_CLONING = 'cloning'
@@ -38,11 +39,11 @@ VERSION_TYPES = (
(UNKNOWN, _('Unknown')),
)
-LATEST = 'latest'
-LATEST_VERBOSE_NAME = 'latest'
+LATEST = getattr(settings, 'RTD_LATEST', 'latest')
+LATEST_VERBOSE_NAME = getattr(settings, 'RTD_LATEST_VERBOSE_NAME', 'latest')
-STABLE = 'stable'
-STABLE_VERBOSE_NAME = 'stable'
+STABLE = getattr(settings, 'RTD_STABLE', 'stable')
+STABLE_VERBOSE_NAME = getattr(settings, 'RTD_STABLE_VERBOSE_NAME', 'stable')
# Those names are specialcased version names. They do not correspond to
# branches/tags in a project's repository.
