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

Comments (0)

Files changed (1)

File wtforms/ext/appengine/

     # Get the field names we want to include or exclude, starting with the
     # full list of model properties.
     props =
-    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: