order the signup form in a logical way
+from collections import OrderedDict
+
from django import forms
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
@@ -23,6 +25,14 @@ class SignupForm(account.forms.SignupForm):
"password_confirm"
]
+ # BEGIN HACK TO ORDER FIELDS
+ # Django 1.8 and or django-forms-bootstrap doesn't respect keyOrder above
+ ordered = OrderedDict()
+ for k in self.fields.keyOrder:
+ ordered[k] = self.fields[k]
+ self.fields = ordered
+ # END HACK TO ORDER FIELDS
+
def clean_email_confirm(self):
email = self.cleaned_data.get("email")
email_confirm = self.cleaned_data["email_confirm"]
