Ticket #6369: modelfield_order.diff

File modelfield_order.diff, 584 bytes (added by Luke Garner <dj-t@…>, 17 years ago)
  • django/newforms/models.py

     
    257257            attrs['base_fields'] = model_fields
    258258        else:
    259259            attrs['base_fields'] = declared_fields
     260       
     261        # If fields is defined in Meta, assume it is in the correct order
     262        if opts.fields:
     263            attrs['base_fields'].keyOrder = opts.fields
    260264        return type.__new__(cls, name, bases, attrs)
    261265
    262266class BaseModelForm(BaseForm):
Back to Top