在shell窗口输入 import viewclass.models as models 来引入模块,结果报错:
django.core.exceptions.ImproperlyConfigured: Requested setting LOGGING_CONFIG, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.
解决:
1.输入
python manage.py shell |
|
---|---|
2.然后
import viewclass.models as models |
|
---|---|