You've defined `settings.REGISTRATION_OPTIONAL_FIELDS` as a list, but the way that you're using it, it might as well be a set; the order that you've defined elements in `settings.REGISTRATION_OPTIONAL_FIELDS` doesn't matter. I'd suggest that you either change the template so that the order of the elements on the page reflects the order in the `REGISTRATION_OPTIONAL_FIELDS` list, or change that list to a set to make it clear that the order of the elements doesn't matter.