class FineForm(forms.ModelForm):
class Meta:
model = Fine
fields = ['student', 'fine']
widgets = {
'student': forms.Select(attrs={'class': 'form-control'}),
'fine': forms.TextInput(attrs={'class': 'form-control'}),
}
I have this Django form. The student field is a foreign key. I want to show the students in reverse order in this form in the template. Help please.