Created
December 11, 2013 18:38
-
-
Save doobeh/7915977 to your computer and use it in GitHub Desktop.
QuerySelectField
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def current_departments(): | |
return Department.query | |
class TransferForm(Form): | |
sender = SelectField('From', choices=[('001', 'IGA'), ('003', 'Gourmet'), ('002', 'Wholesale')]) | |
receiver = SelectField('To', choices=[('001', 'IGA'), ('003', 'Gourmet'), ('002', 'Wholesale')]) | |
department = QuerySelectField('Department', query_factory=current_departments) | |
amount = TextField('Amount') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment