cfpb / django-flags

Feature flags for Django projects
https://cfpb.github.io/django-flags/
Creative Commons Zero v1.0 Universal
260 stars 32 forks source link

Custom conditions not showing up in django admin dropdown #5

Closed callorico closed 6 years ago

callorico commented 6 years ago

I'm creating a custom condition function and decorating it with @register in a separate Django app. However, I do not see it showing up in the condition dropdown in the django admin. It seems like this is because the condition choices are set when the form module is loaded. This happens fairly early when the model admin is registered. I've tried to address that here https://github.com/cfpb/django-flags/pull/4 but please let me know if there is different pattern I should be following to register custom conditions.

willbarton commented 6 years ago

@callorico Nope, I can confirm, it looks like you've caught a bug! I'll make sure to look over #4.

willbarton commented 6 years ago

Merged #4, which fixes this issue.