The text displayed in the drop down comes from the __str__ method of
the referenced model.
So, just implement the __str__ method in the model that your
ModelChoiceField references, and the display will show you that.

On Jun 7, 10:55 am, Mihai Damian <[EMAIL PROTECTED]> wrote:
> I'm using a ModelChoiceField on a form and it seems the value
> attributes of the generated option tags are simply their numeric order
> in the queryset. How can I set the value attribute to some useful
> information like id or the __unicode__ representation itself?
>
> Thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to