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

Enum field doesn't map to the select widget by automatically in the admin page #109

Open
eirenik0 opened this issue Jan 31, 2017 · 1 comment

Comments

@eirenik0
Copy link
Contributor

When defining a model with some Enum column the select widget doesn't appears in the administrative panel.

@slav0nic
Copy link
Contributor

from websauna.system.form.fields import JSONValue, EnumValue
from websauna.system.form.schema import enum_values
...
include = [
   ...
    colander.SchemaNode(EnumValue(Position),
                        name="position",
                        widget=deform.widget.SelectWidget(values=enum_values(Position))),]

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

No branches or pull requests

2 participants