jazzband / django-waffle

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

Documentation example for custom flag #420

Open TAnas0 opened 2 years ago

TAnas0 commented 2 years ago

The documentation for the custom flag shows an example and it might lead to errors and confusion: https://waffle.readthedocs.io/en/stable/types/flag.html#custom-flag-models

The imported get_cache method is not used and the cache variable referenced is undefined.

Is there a missing cache = get_cache() somewhere? Should be placed outside of the class or defined as a class attribute?