Ticket #6369: modelfield_order_3.2.diff
File modelfield_order_3.2.diff, 876 bytes (added by , 17 years ago) |
---|
-
django/newforms/models.py
257 257 attrs['base_fields'] = model_fields 258 258 else: 259 259 attrs['base_fields'] = declared_fields 260 # If Meta defines fields, they should be outputed in the order specified. 261 # But first check to ensure that all items in Meta.fields actually exist. 262 if opts.fields: 263 for key in opts.fields: 264 if not key in attrs['base_fields'].keyOrder: 265 raise ImproperlyConfigured("%s's Meta.fields contains an invalid value: %s" % (name, key)) 266 attrs['base_fields'].keyOrder = opts.fields 260 267 return type.__new__(cls, name, bases, attrs) 261 268 262 269 class BaseModelForm(BaseForm):