Thursday, August 30, 2012

Re: Model ChoiceField?

Ok, ignore this email - I've just realised one is a Form field, and
the other is a Model field. Apols for stupid.

Cheers
L.

On Fri, Aug 31, 2012 at 1:09 PM, Lachlan Musicman <datakid@gmail.com> wrote:
> 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