Skip to content

Commit

Permalink
Add WAFFLE_SWITCH_MODEL to Configuring Waffle page (#535)
Browse files Browse the repository at this point in the history
* Add `WAFFLE_SWITCH_MODEL` to Configuring Waffle page

Fixes #454

Add `WAFFLE_SWITCH_MODEL` and `WAFFLE_SAMPLE_MODEL` settings to the "Configuring Waffle" documentation page.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
dancergraham and pre-commit-ci[bot] authored Dec 27, 2024
1 parent 8eb58fb commit 2b81166
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions docs/starting/configuring.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,22 @@ behavior.
Needs to be set at the start of a project, as the Django migrations framework does not
support changing swappable models after the initial migration.

``WAFFLE_SWITCH_MODEL``
The Django model that will be used for switches. Defaults to ``waffle.Switch``, which
provides basic switch functionality. This can be swapped for a custom Switch model if
additional fields or behaviors are needed. The custom model must inherit from
``waffle.models.AbstractBaseSwitch``. Needs to be set at the start of a project, as
Django’s migration framework does not support changing swappable models after the
initial migration.

``WAFFLE_SAMPLE_MODEL``
The Django model that will be used for samples. Defaults to ``waffle.Sample``, which
provides basic sample functionality. This can be swapped for a custom Sample model if
additional fields or behaviors are needed. The custom model must inherit from
``waffle.models.AbstractBaseSample``. Needs to be set at the start of a project, as
Django’s migration framework does not support changing swappable models after the
initial migration.

``WAFFLE_SWITCH_DEFAULT``
When a Switch is undefined in the database, Waffle considers it
``False``. Set this to ``True`` to make Waffle consider undefined
Expand Down

0 comments on commit 2b81166

Please sign in to comment.