标签:
当输出中文时,错误信息如下:
Non-ASCII character ‘\xe7‘ in file e:\pythonCode\firstsite\firstsite\view.py on line 15, but no encoding declared; see http://www.python.org/peps/pep-0263.html for
经百度,必须在代码前面加注这两句
#coding=gbk
#coding=utf-8
才解决
from django.http import HttpResponse
#coding=gbk
#coding=utf-8
import datetime
标签:
原文地址:http://www.cnblogs.com/xinshijie/p/4234204.html