Skip to content

Form templatetags: raise exceptions when unable to infer an enum #1540

Open
@davidmiller

Description

@davidmiller

Opal form templatetags attempt to infer enums. They look at Django Choices, Opal Lookuplists or arbitrary JSON passed in the template.

Two enhancements would improve this functionality:

  • When passed a Boolean/NullBoolean field, know that the options are e.g. Yes/No/Unknown
  • When a widget that requires an enum (Select, Radio) can't find one, raise an exception rather than rendering an empty widget

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions