Re: Django UnicodeEncodeError in errorlist

2012-04-27 Thread Andrei
Hi Thomas, You seem read my email too quickly. I do use u'å'. In force_unicode() and lazy() Django runs str(u'å') which results in the exception(s). If it would use smart_str instead, the exception would not happen. Am I missing something? Andrei On Friday, April 27, 2012 9:11:19 AM UTC+2, g

Re: Django UnicodeEncodeError in errorlist

2012-04-27 Thread Thomas Guettler
this question belongs to django-user. You need to use u'å' not 'å' in your python code. > Is there a good reason > why |force_unicode| and |lazy| do not use |smart_str|? smart_str() creates a bytestring, but in Django everything is unicode until the end. Only one of the last steps is to encode

Django UnicodeEncodeError in errorlist

2012-04-26 Thread Andrei
Hi, I am having an issue with rendering Django's ErrorList if one of my error list items is unicode. When Django renders my errorlist {{ form.non_field_errors }} it runs the following code : class ErrorList(list, StrAndUnic