检查连接db是否成功:python3 -c “from django.db import connection;print(connection.cursor())”
1、django.db.utils.ConnectionDoesNotExist: The connection default doesn’t exist
解决:第一个连接的命名一定要是default,将EN5Test改为default即可
2、django.core.exceptions.ImproperlyConfigured
Requested setting DATABASES, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings
在执行检查连接是否成功的语句前,执行set DJANGO_SET