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

Allow creation via class + attributes #31

Open
twidi opened this issue Jun 6, 2017 · 1 comment
Open

Allow creation via class + attributes #31

twidi opened this issue Jun 6, 2017 · 1 comment
Labels

Comments

@twidi
Copy link
Owner

twidi commented Jun 6, 2017

Something like

class States(Choices):
    ONLINE = (1, 'Online')
    DRAFT = (2, 'Draft')
    OFFLINE = (3, 'Offline')

An attribute could accept a tuple, as above, or a single value, in which case we have to decide if the display would be the attribute name or the value.
The right part may even be directly a ChoiceEntry.

@twidi
Copy link
Owner Author

twidi commented Jan 31, 2018

Yes, with python 3 it could be an enum. But not sure I can do everything that is already done in the lib with enums. To check but after v2 (see #35 for that)

@twidi twidi added the on-hold label Feb 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant