Thursday, August 30, 2012

Model ChoiceField?

Hi,

I was just wondering if there was any noticeable difference between
the models.ChoiceField() and the models.CharField(max_length=x,)?

In the documentation I have (offline, Django v1.4) a reference to:

/path/django-docs-1.4-en/ref/forms/fields.html#django.forms.ChoiceField.choices

But in the example given at
/path/django-docs-1.4-en/ref/models/fields.html#field-choices they use
the CharField() method.

Is there a discernible difference or is it just for clarity?

cheers
L.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment