-
Notifications
You must be signed in to change notification settings - Fork 60
Open
Description
This is related to #120. The proposed solution there doesn't work for us, though. The selectable values should be returned in the OPTIONS call for the frontend to only show them.
In our usecase it shouldn't be possible to select all values of an Enum on the model, also for the database model. An idea would be to add this as an additional parameter to the model field, e.g.:
enum_field_with_limited_choices = EnumField(
EnumWithManyChoices,
max_length=100,
selectable_choices=[EnumWithManyChoices.Choice1, EnumWithManyChoices.Choice2]
)I guess this would be trivial to implement. If you agree it's useful, I can make a proposal.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels