Given that I have this general form:
from django import forms
class TimesForm(forms.Form):
hours = forms.DecimalField()
description = forms.CharField()
topic = forms.CharField()
And I want to display this form in html. What is the best way to dynamically control the appearance order? In other words, the user should be able to control the order in which these input fields are displayed on the screen.
So far I have been able to iterate through these fields:
{% for field in form %}
{{field}}
{% endfor %}
I did not find the correct way to control the order in which input fields appear. How am I best to do this?
source
share