Django運行報錯:django.core.exceptions.ImproperlyConfigured

Django運行報錯

django.core.exceptions.ImproperlyConfigured: Requested setting INSTALLED_APPS, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.

發現pycharm 右上角選擇運行的文件錯誤,應該選擇dj項目

修改成

 

再次運行就不會報錯了

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章