Skip to content

Commit

Permalink
docs: Include import in usage example (#359)
Browse files Browse the repository at this point in the history
I can never remember what module to import from. :-)
  • Loading branch information
timmc-edx authored May 7, 2024
1 parent 490e495 commit 4485ca8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/how_to/implement_the_right_toggle_type.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ Flags and switches are created with a name. The namespace prefix is used to cate

.. code:: python
from edx_toggles.toggles import SettingToggle, WaffleFlag, WaffleSwitch
FOO_FLAG = WaffleFlag('namespace.some_feature', module_name=__name__)
BAR_SWITCH = WaffleSwitch('namespace.some_feature', module_name=__name__)
BAZ_TOGGLE = SettingToggle("SOME_SETTING_TOGGLE", default=False, module_name=__name__)
Expand Down

0 comments on commit 4485ca8

Please sign in to comment.