jazzband / django-waffle

A feature flipper for Django
https://waffle.readthedocs.io
BSD 3-Clause "New" or "Revised" License
1.12k stars 256 forks source link

Feature request: Add switches problematically #502

Open sowinski opened 4 months ago

sowinski commented 4 months ago

Hi,

it would be very nice if we would be able to define all switches in a config with there names, default value and notes.

That way, we would have in all our environments (dev / stage / prod) the same switches.

Currently I add them manually over the admin. Which is of course a nice feature but not a good solution for constancy.

What do you think about that?

clintonb commented 4 months ago

You can do that now with a data migration.

sowinski commented 4 months ago

Is this documented somewhere? It do you have an exaple?

clintonb commented 4 months ago

It's not documented in this app, but here are the official Django docs: https://docs.djangoproject.com/en/5.0/topics/migrations/#data-migrations. use migrations.RunPython.

Feel free to open a pull request if you think others might benefit from documentation.

clintonb commented 3 months ago

Related to #50