1. Andreas Madsack
  2. wtforms


James Crasta  committed 1ed8956

model_form uses the property ordering by definition as given by the db.Model. Fixes #72.
Thanks kvdb for patch.

  • Participants
  • Parent commits e32e77e
  • Branches default

Comments (0)

Files changed (1)

File wtforms/ext/appengine/db.py

View file
     # Get the field names we want to include or exclude, starting with the
     # full list of model properties.
     props = model.properties()
-    field_names = props.keys()
+    sorted_props = sorted(props.iteritems(), key=lambda prop: prop[1].creation_counter)
+    field_names = list(x[0] for x in sorted_props)
     if only:
         field_names = list(f for f in only if f in field_names)
     elif exclude: