﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
6369	ModelForm fields ordering when Meta.fields is set	Luke Garner <dj-t@…>	nobody	"Field ordering is currently determined by the order the fields were originally defined in the model. However, if the user specifically defines the fields to use in Meta.fields, it's safe to assume that's the order the user wants the fields to be outputted in.

Right now, this is accomplished with:
{{{
#!python
class myForm(forms.ModelForm):
    def __init__(self, *args, **kwargs):
        super(myForm, self).__init__(*args, **kwargs)
        self.fields.keyOrder = self.Meta.fields #This line should be unnecessary
    class Meta:
        model = myModel
        fields = ['field_3', 'field_2', 'field_9']
}}}

The new version would just be:
{{{
#!python
class myForm(forms.ModelForm):
    class Meta:
        model = myModel
        fields = ['field_3', 'field_2', 'field_9']
}}}"		closed	Forms	dev		duplicate			Accepted	1	1	1	1	0	0
