order pubisher list in book.html by name not id
This commit is contained in:
2
main.py
2
main.py
@@ -164,7 +164,7 @@ class BookForm(FlaskForm):
|
||||
title = StringField('Title:', [validators.DataRequired()])
|
||||
# author built by hand
|
||||
# genre built by hand
|
||||
publisher = SelectField( 'publisher', choices=[(c.id, c.name) for c in Publisher.query.order_by('id')] )
|
||||
publisher = SelectField( 'publisher', choices=[(c.id, c.name) for c in Publisher.query.order_by('name')] )
|
||||
owned = SelectField( 'owned', choices=[(c.id, c.name) for c in Owned.query.order_by('id')] )
|
||||
covertype = SelectField( 'covertype', choices=[(c.id, c.name) for c in Covertype.query.order_by('id')] )
|
||||
condition = SelectField( 'condition', choices=[(c.id, c.name) for c in Condition.query.order_by('id')] )
|
||||
|
||||
Reference in New Issue
Block a user