Files
edx-platform/openedx/features/course_experience/waffle.py
Robert Raposa 8ef8b35a54 docs: update toggle docs
A variety of updates were made to improve the toggle documentation:
* Added comments to help ensure that the waffle(), waffle_switches(),
  waffle_flags() anti-pattern won't be contagious (copied).
* Some minor toggle_description updates.
* Removed empty toggle_target_removal_date annotations for
  non-temporary toggles.
* Removed empty optional toggle_warnings annotations.
* Removed empty optional toggle_tickets annotations.
* Removed deprecated toggle_category, toggle_status,
  and toggle_expiration_date annotations.
* Fixed some indents, use cases, and implementations.

ARCHBOM-1721
2021-04-01 21:58:29 -04:00

33 lines
1.1 KiB
Python

"""
Miscellaneous waffle switches that both LMS and Studio need to access
"""
from edx_toggles.toggles import LegacyWaffleSwitchNamespace
# Namespace
WAFFLE_NAMESPACE = u'course_experience'
# Switches
# .. toggle_name: course_experience.enable_about_sidebar_html
# .. toggle_implementation: WaffleSwitch
# .. toggle_default: False
# .. toggle_description: Used to determine whether to show custom HTML in the sidebar on the internal course about page.
# .. toggle_use_cases: open_edx
# .. toggle_creation_date: 2018-01-26
# TODO: Replace with WaffleSwitch(). See waffle() docstring.
ENABLE_COURSE_ABOUT_SIDEBAR_HTML = u'enable_about_sidebar_html'
def waffle():
"""
Deprecated: Returns the namespaced, cached, audited shared Waffle Switch class.
IMPORTANT: Do NOT copy this pattern and do NOT use this to reference new switches.
Instead, replace the string constant above with the actual switch instance.
For example::
ENABLE_COURSE_ABOUT_SIDEBAR_HTML = WaffleSwitch(f'{WAFFLE_NAMESPACE}.enable_about_sidebar_html')
"""
return LegacyWaffleSwitchNamespace(name=WAFFLE_NAMESPACE, log_prefix=u'Course Experience: ')