On Thu, Feb 24, 2011 at 1:32 AM, Tom Evans <tevans...@googlemail.com> wrote: > On Wed, Feb 23, 2011 at 9:17 PM, Lee Hinde <leehi...@gmail.com> wrote: >> Except, now the data that's in the database for the username field >> goes from looking like this: >> leehinde >> to this >> (u'leehinde',) >> >> I'd like it to be 'leehinde' again >> so, clearly objects.create is more clever than my pure post. But I'm >> not sure where in the food chain I should be interceding.. >> > > http://docs.djangoproject.com/en/1.2/ref/unicode/#general-string-handling > > """ > In most cases when Django is dealing with strings, it will convert > them to Unicode strings before doing anything else. So, as a general > rule, if you pass in a bytestring, be prepared to receive a Unicode > string back in the result. > """ > > Be prepared :) >
Thanks Tom; sadly I'm ill-prepared. a) It's curious that the two django methods (get_or_create vs create) do different things. b) I tried wrapping the form fields in str() and got an error, but I'll play with that some more and figure out why. I'd found that page, as I really did google 'django unicode, etc.' before posting. :-) but it assumes more python skill than I have this week. -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.