Well, regardless, it works if you convert it to a str first. Thanks for the help!
On Thu, Aug 19, 2010 at 11:02 AM, Rolando Espinoza La Fuente < dark...@gmail.com> wrote: > On Thu, Aug 19, 2010 at 12:14 PM, Dane Larsen <dane.t.lar...@gmail.com> > wrote: > [...] > > I then tried: > > response.delete_cookie(key=str(color_id)) > > and it worked fine. > > Should I report this as a bug? > > Cookie.Morsel does not handle unicode strings, mainly because > string.translate expects > two arguments where unicode.translate expects only one. > > A fix to django.http.CompatCookie could be: > > + def __setitem__(self, K, V): > + # Cookie.Morsel does not handle unicode keys > + return SimpleCookie.__setitem__(self, smart_str(K), V) > > But I'm not sure if you should try to use an unicode key in a cookie. > > > Rolando Espinoza La fuente > www.insophia.com > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-us...@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@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.