[NOTE: this answer is currently completely out of date - see discussion below and more recent answers].
If f is a form, its fields are f.fields , i.e. django.utils.datastructures.SortedDict (it represents the elements in the order they were added). After building the form, f.fields has the keyOrder attribute, which is a list containing the names of the fields in the order in which they are presented. You can set this in the correct order (although you need to be careful not to skip items or add additional ones).
Here is an example that I just created in my current project:
class PrivEdit(ModelForm): def __init__(self, *args, **kw): super(ModelForm, self).__init__(*args, **kw) self.fields.keyOrder = [ 'super_user', 'all_districts', 'multi_district', 'all_schools', 'manage_users', 'direct_login', 'student_detail', 'license'] class Meta: model = Privilege
holdenweb Jul 28 '09 at 0:12 2009-07-28 00:12
source share