Michael napisaĆ(a): > Thanks Thomas... your shot in the dark hit it's mark for me :) > > I was suffering the same "can't adapt" psycopg2 error (worked fine > with sqlite), but it was due to the exact reason you stated. > > Although your solution is probably better in the long run, another > solution is to simply convert the result of slugify into a normal > string (as slugify now returns a django.utils.safestring.SafeUnicode > object and the psycopg2 cursor cannot convert this to a string). For > example: > >>>> from django.template import defaultfilters > >>>> self.group_slug = defaultfilters.slugify(self.name) > > becomes: >>>> self.group_slug = str(defaultfilters.slugify(self.name)) > > Thanks again! It's been causing me headaches...
I'll try this. I tried to do a force_unicode() on slughifi output, but without luck. I'll try with str() instead. -- Jarek Zgoda Skype: jzgoda | GTalk: [EMAIL PROTECTED] | voice: +48228430101 "We read Knuth so you don't have to." (Tim Peters) --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---