Django 1.11 shell中模块导入问题
django报错:django.core.exceptions.ImproperlyConfigured: 处理办法
import os
os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings' (mysite是你自己的工程名)
不设置下面可能会导致的问题:
Django throws django.core.exceptions.AppRegistryNotReady: Models aren't loaded yet
import django
django.setup()