django项目添加utf-8编码支持中文时间:2023-03-09 15:48:05 代码中出现中文会报错: Non-ASCII character '...' in file ......models.py on line ......., but no encoding declared; 只需在用了中文的文件里加一句: # _*_ coding: utf-8 _*_