
Django
huang.lin
talk is cheap,show me your "code".
展开
-
(admin.E408)(admin.E409)(admin.E410)must be in MIDDLEWARE in order to use the admin application
Django在运行登录时报错,报错信息如下ERRORS:?: (admin.E408) 'django.contrib.auth.middleware.AuthenticationMiddleware' must be in MIDDLEWARE in order to use the admin application.?: (admin.E409) 'django.contrib.messages.middleware.MessageMiddleware' must be in MIDDLEW原创 2021-03-25 11:44:09 · 750 阅读 · 0 评论 -
django Error: That IP address can‘t be assigned to.
运行环境:系统:阿里云Ubuntu 18.04.3 LTS (GNU/Linux 4.15.0-52-generic x86_64)python:python3mysql:5.7.27-0ubuntu0.18.04.1 (Ubuntu)mysql-client:5.7.27-0ubuntu0.18.04.1 (Ubuntu)报错描述: 在启动Django程序(python manage.py runserver)时报错"That IP address can't be assi..原创 2020-07-05 23:30:07 · 2719 阅读 · 0 评论 -
运行django项目出现Invalid HTTP_HOST header: 'ip:port'. You may need to add ''ip:port' to ALLOWED_HOSTS
解决办法:在setting.py里将ALLOWED_HOSTS = []改成ALLOWED_HOSTS = ['*']。原创 2019-07-09 21:55:38 · 1659 阅读 · 0 评论 -
Django安装启动及部署(apache)
环境:ubuntu18.04 LTSPython 3.6.8DB:Mysql首先安装python3sudo apt-get install python3.6如果不是pip3的话可以先安装pip3,否则后面的pip3换成pipsudo apt install python3-pip安装Djangosudo pip3 install Django可以用...原创 2019-07-10 19:44:29 · 1452 阅读 · 0 评论 -
django.core.exceptions.ImproperlyConfigured: mysqlclient 1.3.13 or newer is required; you have 1.3.1
Djanggo 运行报错:django.core.exceptions.ImproperlyConfigured: mysqlclient 1.3.13 or newer is required; you have 1.3.10.解决办法:1、Uninstall mysqlclient: pip3 uninstall mysqlclient2、Uninstall pymysql: pi...原创 2019-07-11 19:16:13 · 276 阅读 · 0 评论