Hi list

I have a model with a field defined like this:

   categories = ArrayField(models.CharField(max_length=32))


This field is accessible via the admin interface, and when I enter 
comma-separated values in the charfield, they are stored as an array in the DB.

However, I just discovered that if I enter comma+space separated values, e.g. 
"teachers, locations, students", it gets converted to ['teachers', ' 
locations', ' students'] which is not what I want. How go I get the ArrayField 
to strip the values after splitting by comma?

Thanks,
Erik

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/5CFD8C84-1159-411E-B375-77FB835B9048%40cederstrand.dk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to