On Jan 21, 3:59 pm, Shawn Milochik <shawn.m...@gmail.com> wrote:
> > I think there might be a terminology issue here. I suspect the OP is
> > looking for all the possible value of a model field with `choices`
> > set. Which, is not easily possible from a template (although you can
> > do it in Python: MyModel._meta.get_field_by_name('myfield')
> > [0].choices)
> > --
> > DR.
> > --
>
> My last post gave exactly that -- all the possible values of the choices 
> model field.
>
> Shawn

No, you gave the choices for the ChoiceField **form** field, a
different thing entirely. As you've shown, assuming you've got a form,
it's easy to get the field choices. But if you don't have a form to
start with, it's hard to get the field choices, even though they are
stored on the model.
--
DR.
-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.


Reply via email to