好吧,这里是:
放在# -*- coding: utf-8 -*-
文件顶部,它定义解码。
该文件说:
如果没有其他编码提示,Python将默认使用ASCII作为标准编码。
To define a source code encoding, a magic comment must
be placed into the source files either as first or second
line in the file, such as:
因此,您的代码必须开始:
# -*- coding: utf-8 -*-
from django.shortcuts import render
from django.http import HttpResponse
from django.template.loader import get_template
...
希望有所帮助