1 编码问题
直接运行Django没问题,但通过Apache+mod_wsgi上传中文字符的文件时出错:
UnicodeEncodeError: 'ascii' codec can't encode characters in position...
解决办法:修改 /etc/apache2/envvars ,然后重启Apache即可
export LANG='zh_CH.UTF-8' export LANG_ALL='zh_CH.UTF-8'
2 权限问题
PermissionError: [Errno 13] Permission denied
给该目录chmod增加个权限即可