Django
小盼你最萌哒
这个作者很懒,什么都没留下…
展开
-
-bash: /usr/local/nginx/sbin/nginx: No such file or directory
走Django教程时,出现如下错误:是因为我们安装的Nginx1.5.6版本,安装路径是带了版本号的,教程的是没带的,所以会提示找不到文件。换成如下指令就好了。uwsgi --ini /etc/uwsgi9090.ini & /usr/local/nginx-1.5.6/sbin/nginx...原创 2021-03-04 09:59:19 · 7886 阅读 · 1 评论 -
Django 错误 TypeError: unsupported operand type(s) for PosixPath and str
在学习Django模版的时候,遇到了如下错误。root@iZ2ze4r3b4xczuujolp68uZ:~/Detection# python3 manage.py runserver 0.0.0.0:8006Traceback (most recent call last): File "manage.py", line 22, in <module> main() File "manage.py", line 18, in main execute_from_co原创 2020-06-17 10:07:17 · 868 阅读 · 4 评论 -
Django错误 DisallowedHost at / Invalid HTTP_HOST header. You may need to add to ALLOWED_HOSTS.
创建好了Django,但是出现以下错误。DisallowedHost at /Invalid HTTP_HOST header: '101.201.155.148:8006'. You may need to add '101.201.155.148' to ALLOWED_HOSTS.Request Method: GETRequest URL: http://101.201.155.148:8006/Django Version: 3.1a1Exception Type: Disallow原创 2020-06-17 09:26:57 · 1587 阅读 · 1 评论