Skip to content

EnumField's should inherit from common base titled EnumField #46

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

Closed
bckohan opened this issue Apr 29, 2023 · 0 comments
Closed

EnumField's should inherit from common base titled EnumField #46

bckohan opened this issue Apr 29, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@bckohan
Copy link
Member

bckohan commented Apr 29, 2023

Right now to determine if a field is an EnumField the best option is to do something like:

from django_enum.fields import EnumMixin

isinstance(Model._meta.get_field('field'), EnumMixin)

This is not documented and not intuitive given that EnumFields are defined as EnumField. Should be able to make this test with EnumField rather than EnumMixin.

@bckohan bckohan self-assigned this Apr 29, 2023
@bckohan bckohan added the enhancement New feature or request label Apr 29, 2023
bckohan added a commit that referenced this issue May 1, 2023
@bckohan bckohan added this to the Version 2.0 milestone May 1, 2023
@bckohan bckohan closed this as completed Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant