Open honzakral opened 3 years ago
I have same issue. The solution suggested by @HonzaKral seems reasonable. Is there any interest in such a PR?
Yes, PRs are welcome.
This feature was reverted. See https://github.com/django-waffle/django-waffle/issues/435 for some details. Please modify the logic to ensure it supports flags, switches, and samples.
I am using the Flags in other scenarios aside from just views (celery tasks for example) and I was surprised that the
CREATE_MISSING_FLAGS
setting wasn't respected (I am manually callingis_active_for_user
and other, custom, methods I created based on the example) and the methods were failing with error:In my mind there should be a way to check if a flag is active using similar mechanism to
waffle.flag_is_active
which would work and respect theCREATE_MISSING_FLAGS
setting, simplest solution seems to move the logic fromis_active
toget()
. I would be happy to submit a PR if this would be considered a useful addition.