【发布时间】:2020-07-18 01:05:25
【问题描述】:
好的,这就是问题所在。当我使用django-admin.py startproject myproject 创建一个django 项目并启动像python3 manage.py runserver 这样的服务器时,一切正常。
但是,当我使用 django-admin startproject myproject 创建项目并启动像 python3 manage.py runserver 这样的服务器时,它给了我大量的系统检查错误,例如:
django.core.exceptions.ImproperlyConfigured: Passing a 3-tuple to include() is not supported. Pass a 2-tuple containing the list of patterns and app_name, and provide the namespace argument to include() instead.
或
django.core.management.base.SystemCheckError: SystemCheckError: System check identified some issues:
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 MIDDLEWARE in order to use the admin application.
?: (admin.E410) 'django.contrib.sessions.middleware.SessionMiddleware' must be in MIDDLEWARE in order to use the admin application.
【问题讨论】:
标签: python django python-3.x django-admin