尝试在我的项目上打开管理页面时出错。urls.py 行有问题
url(r'^letter/([a-zA-Z0-9µ])/$', common.views.letters),
错误:
UnicodeDecodeError at /admin/
'ascii' codec can't decode byte 0xc2 in position 19: ordinal not in range(128)
Request Method: GET
Request URL: http://127.0.0.1:8000/admin/
Django Version: 1.6
Exception Type: UnicodeDecodeError
Exception Value:
'ascii' codec can't decode byte 0xc2 in position 19: ordinal not in range(128)
Exception Location: C:\Python27\lib\site-packages\django\core\urlresolvers.py in _populate, line 264
Python Executable: C:\Python27\python.exe
Python Version: 2.7.3
除管理页面外的项目工作正常。我理解“μ”中的那个问题。但是如何使它工作呢?
urls.py 的第一行:
# -*- coding: utf-8 -*-