django-modeladmin-reorder
django-modeladmin-reorder copied to clipboard
Support Non-ASCII character in labels
I tried to customize a label in spanish bu couldn't. I got this error:
SyntaxError: Non-ASCII character '\xc3' in file /Users/username/myproject/settings.py on line xxx, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
I am using OS X EL Capitan
Will adding the following at the top of the file, fix this issue?
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
It worked!!!! Using only this
# -*- coding: utf-8 -*-
But if i paste the 'from future' line, this is what i get:
TypeError at /admin/
ADMIN_REORDER list item must be dict or string. Got u'myapp'
If you want to do a pull request with just the first line. I'll be happy to merge it.
@javierdaza Sorry it took me this long to look into this. Can you try the latest master version and see if you still get this error. If not I'll push it to PyPi. – Mishbah
@mishbahr don't worry. Didn't do a pull request because before because didn't know how to fix it properly. I will try and let you know, probably starting next week
And even more - last commit has broken Python 3 compatibility because basestring is no longer available in Python 3.
@dglinyanov sorry about that. Fixed.