bread-and-pepper/django-userena — pull request #288 by pfeyz (2013-02-25 06:09:38+00:00)
Title: EditProfileForm forces ordering of and overwrites fields

The code assumes 'first_name' and 'last_name' will always be the last two fields
in the form. This assumption is incorrect if additional fields are added to the
form ::

class CustomProfileForm(EditProfileForm):
extra_info = forms.CharField(label='Extra Info')
more_extra_info = forms.CharField(label='Extra Info')

or if the fields are explicitly ordered ::

class EditProfileFormExtra(EditProfileForm):
class Meta(EditProfileForm.Meta):
fields = ('first_name', 'last_name', 'mugshot', 'privacy')

Both produce additional first_name/last_name pairs in the rendered form, and in
the latter case they overwrite mugshot and privacy.

It seems best to leave the ordering up to Meta.fields.
https://docs.djangoproject.com/en/dev/topics/forms/modelforms/#changing-the-order-of-fields