Alex Rivera | Logout

How to add verbose_name to forms

Asked 2012-11-06T09:31:58.580
31

How to add verbose_name to forms in Django?

In forms.py:

class SendOrderForm(forms.Form):
   send_option = forms.ModelChoiceField(queryset=Send.objects.all(), verbose_name="Send Options")

This is not correct

Edit
Report

1 Answer

65

I think, label argument is what you need:

class SendOrderForm(forms.Form):
   send_option = forms.ModelChoiceField(queryset=Send.objects.all(), label="Send Options")
answered 2012-11-06T09:35:39.853

Your Answer