On Thu, 2009-08-06 at 07:35 -0700, nono wrote:
> I was reading my post and though it was not very clear
>
> My model uses CommaSeparatedIntegerField to store some integer values.
> I want my users to use SelectMultiple widget to create/update those
> integer so I put a ChoiceField with widget=SelectMultiple in my form.
> My problem is that all I can get from this is a list of values (for
> example [u'2', u'3']) where I expect comma separated values ("2, 3").
>
> I hope this is a better explanation and somebody could help me
If you want to normalise the values that are submitted to something
other than what happens automatically, write a clean_<fieldname>()
method for that form field. Have a look at
http://docs.djangoproject.com/en/dev/ref/forms/validation/
for details.
Regards,
Malcolm
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---