Files
edx-platform/openedx/core/djangoapps/util/waffle.py
Troy Sankey 1773107db4 Maintenance banner functionality, including a new waffle switch and setting
This adds the following new waffle switch (and namespace):

open_edx_util.display_maintenance_warning

and a new setting:

settings.MAINTENANCE_BANNER_TEXT

The provided view decorator allows developers to select which views
receive the static banner, and the banner can be globally toggled via
the waffle switch.  The text of the banner is determined by the setting,
which is currently not translated.
2018-03-20 17:54:48 -04:00

19 lines
449 B
Python

"""
Waffle flags and switches
"""
from __future__ import absolute_import
from openedx.core.djangoapps.waffle_utils import WaffleSwitchNamespace
WAFFLE_NAMESPACE = u'open_edx_util'
# Switches
DISPLAY_MAINTENANCE_WARNING = u'display_maintenance_warning'
def waffle():
"""
Returns the namespaced, cached, audited Waffle class for open_edx_util.
"""
return WaffleSwitchNamespace(name=WAFFLE_NAMESPACE, log_prefix=u'OpenEdX Util: ')