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

Single choice type #13

Open
yychen opened this issue Mar 20, 2022 · 0 comments
Open

Single choice type #13

yychen opened this issue Mar 20, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@yychen
Copy link
Owner

yychen commented Mar 20, 2022

Description

Currently the types are simple. We often use string to refer to some state, but actually it should be a single choice. For example, there might be a key called system.state and there are only four possible values intro, opened, post-event and closed. If we use the str type, then it is error prone due to typo, extra spaces, first letter capitalized etc.

Possible Solutions

With the introduction of schema (#12), we might be able to define the possible values in the schema. And we can use a drop-down or single select widget in django-admin to render only possible values.

I think we can also put help text in the schema explaining what each value represents.

@yychen yychen added the enhancement New feature or request label Mar 20, 2022
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