Django Waffle — django-waffle 5. 0. 0 documentation - Read the Docs Configuring Waffle Types Flags Switches Samples Using Waffle Using Waffle in views Decorating entire views Mixins for Class Based Views Using Waffle in templates Using WaffleJS Waffle Status as JSON Managing Waffle data from the command line Testing with Waffle Automated testing with Waffle User testing with Waffle Contributing to Waffle Waffle
Using Waffle — django-waffle 5. 0. 0 documentation Using Waffle Waffle provides a simple API to check the state of flags, switches, and samples in views and templates, and even on the client in JavaScript
Configuring Waffle — django-waffle 5. 0. 0 documentation Waffle tries to store objects in cache pretty aggressively If you ever upgrade and change the shape of the objects (for example upgrading from <0 7 5 to >0 7 5) you’ll want to set this to something other than 'waffle:'
Flags — django-waffle 5. 0. 0 documentation - Read the Docs If you use a custom flag model to apply to models beyond Users and Groups, you must run Django’s makemigrations before running migrations as outlined in the installation docs If you need to reference the class that is being used as the Flag model in your project, use the get_waffle_flag_model() method
Installation — django-waffle 5. 0. 0 documentation If you are using Jinja2 templates, the django-jinja dependency is currently unavailable with django 3 0 and greater; 2 x versions are compatible as well as 1 11
Using Waffle in templates — django-waffle 5. 0. 0 documentation Using Waffle in templates Waffle makes it easy to test flags, switches, and samples in templates to flip features on the front-end It includes support for both Django’s built-in templates and for Jinja2
Switches — django-waffle 5. 0. 0 documentation - Read the Docs The custom Switch model must inherit from waffle models AbstractBaseSwitch When using a custom Switch model, you must run Django’s makemigrations before running migrations as outlined in the installation docs
Why Waffle? — django-waffle 5. 0. 0 documentation - Read the Docs Waffle is one of several options for managing feature flags in Django applications Waffle aims to provide a simple, intuitive API everywhere in your application; cover common use cases with batteries-included; be simple to install and manage; be fast and robust enough to use in production; and minimize dependencies and complexity
Getting Started — django-waffle 5. 0. 0 documentation Why Waffle? Getting Started Requirements Installation Upgrading Configuring Waffle Types Using Waffle Testing with Waffle Contributing to Waffle Waffle’s goals Roadmap
Automated testing with Waffle — django-waffle 5. 0. 0 documentation Automated testing with Waffle Feature flags present a new challenge for writing tests The test database may not have Flags, Switches, or Samples defined, or they may be non-deterministic My philosophy, and one I encourage you to adopt, is that tests should cover both code paths, with any feature flags on and off