wtforms-sqlalchemy
wtforms-sqlalchemy copied to clipboard
Allow to override the default blank value "__None"
The sentinel value to detect a blank option is currently __None. This is unfortunately incompatible with select2. select2 expects a blank field to have an empty value. I assume that there are more tools out there with this requirement so I think it would be valuable if this use case was supported by wtforms-sqlalchemy.
This PR adds the keyword argument blank_value to QuerySelectField to make it configurable. It's still __None by default for backwards compatibility.
This is similar to PR #27 but configurable and with tests and documentation.