cfpb / django-flags

Feature flags for Django projects

Home Page:https://cfpb.github.io/django-flags/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add Quickstart step to show flags in the admin

higs4281 opened this issue · comments

Flags that are declared in Django settings don't show up in the admin because of a Catch-22: The admin only shows database entries, and db entries are only created by admin actions.

One way to avoid a dead end in the Quickstart guide is to add a manage.py step, something like this, just before the Django admin section:


... [URL guidance]

Instantiate the blank flag in the database with a manage.py command:

python manage.py disable_flag MY_FLAG

Then in the Django admin ...


An alternative could be to hack the Django admin to show both database entries and settings-declared flags, similar to the way wagtail-flags does, but that would duplicate effort and complicate the way the apps work together.