web/views/autoform.py
branchstable
changeset 3874 7d0d4a6be046
parent 3689 deb13e88e037
child 3889 8902b8745918
child 4212 ab6573088b4a
equal deleted inserted replaced
3873:4d95109582c7 3874:7d0d4a6be046
   178                                                eschema=entity.e_schema)
   178                                                eschema=entity.e_schema)
   179                     self.fields.append(field)
   179                     self.fields.append(field)
   180                 except form.FieldNotFound:
   180                 except form.FieldNotFound:
   181                     # meta attribute such as <attr>_format
   181                     # meta attribute such as <attr>_format
   182                     continue
   182                     continue
       
   183         fnum = len(self.fields)
       
   184         self.fields.sort(key=lambda f: f.order is None and fnum or f.order)
   183         self.maxrelitems = self.req.property_value('navigation.related-limit')
   185         self.maxrelitems = self.req.property_value('navigation.related-limit')
   184         self.force_display = bool(self.req.form.get('__force_display'))
   186         self.force_display = bool(self.req.form.get('__force_display'))
   185 
   187 
   186     @property
   188     @property
   187     def related_limit(self):
   189     def related_limit(self):