On 16 Dic, 04:03, Karen Tracey <kmtra...@gmail.com> wrote: > On Tue, Dec 15, 2009 at 2:42 PM, goome <marcs2...@gmail.com> wrote: > > Hello > > i have a model with a CharField field. > > When in the admin panel i try to insert a new record for the model > > with a text containing "é" for the field, i got > > """UnicodeEncodeError at /admin/abruzzodavedere/servizio/4/ > > > 'ascii' codec can't encode character u'\xe8' in position 14: ordinal > > not in range(128) > > > Request Method: POST > > Request URL: http://127.0.0.1:8000/admin/abruzzodavedere/servizio/4/ > > Exception Type: UnicodeEncodeError > > Exception Value: > > > 'ascii' codec can't encode character u'\xe8' in position 14: ordinal > > not in range(128) > > """ > > i didn't make any change in the Admin, i mean i simply register the > > model. Now just switched to django1.1 > > This error did not appear with django096. > > i did NOT do a new installation of the directory after upgrading > > django, i just corrrectet max[_]length and created the admin.py > > Can be that the problem? > > Thank you > > Did you convert your old __str__ method to __unicode__? > > Without the full traceback and some more specifics of your model it's hard > to guess what's wrong. I can say in general the admin certainly supports > saving and displaying non-ASCII character data without throwing encoding > errors. There is something specific to your model that is causing this. > > Karen Ies, it was the presence of a __str__ method and the absence of a __unicode__ method. i,m goingo to convert all of them. Thanks a lot
-- 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.