django-flags icon indicating copy to clipboard operation
django-flags copied to clipboard

Add Quickstart step to show flags in the admin

Open higs4281 opened this issue 3 years ago • 0 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.

higs4281 avatar Sep 27 '21 19:09 higs4281