1. event
Add Event item in Django admin. When I add a name which contain Chinese characters. It thrown a exception.
2. Error desc
‘ascii’ codec can’t encode characters in position 0-1: ordinal not in range(128)3. solution
- Add
coding: utf-8
at head in manage.py script file, but it’s none work - I was referencing a blog topic, then get the work solution:
add blow code in manage.py
reload(sys) sys.setdefaultencoding('utf-8')
It’s work!