在python的开发中,遇到了这个错误:
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 manage.py shell进入交互模式,执行下列代码即可: