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

Add support for callable type map #81

Merged
merged 1 commit into from
May 21, 2015

Conversation

quantus
Copy link
Collaborator

@quantus quantus commented May 20, 2015

This commit adds support for callable type map. This makes it possible to customize form field type based on data on the corresponding column in the model.

@@ -272,6 +272,8 @@ Let's say we want to convert all unicode typed properties to TextAreaFields inst
type_map = ClassMap({sa.Unicode: TextAreaField})


In case the type_map dictionary values are not inherited from WTForm field class, they are considered callable functions. They will called with the corresponding column as their only parameter.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small typo, "They will called" -> "These functions will be invoked" or "These functions will be called"

kvesteri added a commit that referenced this pull request May 21, 2015
Add support for callable type map
@kvesteri kvesteri merged commit 3dc71af into kvesteri:master May 21, 2015
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

Successfully merging this pull request may close these issues.

2 participants