Ticket #6369: modelfield_order_2.diff

File modelfield_order_2.diff, 555 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        if opts.fields:
     261            attrs['base_fields'].keyOrder = [key for key in opts.fields if key in attrs['base_fields'].keyOrder]
    260262        return type.__new__(cls, name, bases, attrs)
    261263
    262264class BaseModelForm(BaseForm):
Back to Top