Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom flag models #292

Closed
wants to merge 1 commit into from

Conversation

hugobessa
Copy link

@hugobessa hugobessa commented Apr 26, 2018

WAFFLE_FLAG_MODEL

The model that will be used to keep track of flags. Defaults to waffle.Flag which allows user- and group-based flags. Can be swapped for a different Flag model that allows flagging based on other relationships or properties, such as an Organization a user belongs to. Analogous functionality to Django's extendable User models. Needs to be set at the start of a project.

Obs.: Migrations do not support changing after the initial migration.

This PR creates two abstract models to help users create their own Flag model with existing functionality: AbstractBaseFlag and AbstractUserFlag.

This is the same code written by @koliber here, I only rebased it.

fixes #181, fixes #286

@hugobessa hugobessa changed the title Implemented custom flag models Custom flag models Apr 26, 2018
@hugobessa hugobessa closed this Apr 26, 2018
@clintonb
Copy link
Collaborator

See #291

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Abstract base models Customizable Flag's groups model
2 participants