Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add WAFFLE_SWITCH_MODEL to Configuring Waffle page #535

Merged
merged 3 commits into from
Dec 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading