报错:
django.core.exceptions.ImproperlyConfigured: Requested setting DEFAULT_INDEX_TABLESPACE, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.
原因:
python启动方式python,会启动交互解释器,需要告诉Django使用哪个设置文件,Django会搜索DJANGO_SETTINGS_MODULE环境变量,它被设置在settings.py中,
需要设置为:multiDatabase.settings
解决方法:用python manage.py shell 来启动命令解释器而不是python,因为python manage.py shell中包含了Django使用哪个settings.py文件