
Untitled
By: a guest on
May 17th, 2012 | syntax:
None | size: 0.59 KB | hits: 13 | expires: Never
FormAlchemy drop down list not setting values
Location = model.meta.Session.query(model.Location)
cityCodes = {}
for row in Location:
cityCodes.update({row.city : str(row.location_code)})
EmpsPerson.wiw_location_code.label('Location').dropdown(options = cityCodes),
<option value="Dubai">Dubai</option>
<option value="Portsmouth">Portsmouth</option>
<option value="Toulouse">Toulouse</option>
<option value="Singapore">Singapore</option>
for row in Location:
cityCodes.append([row.city,int(row.location_code)])
EmpsPerson.location_code.label('Location').dropdown(options=cityCodes)