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項目
由
修改成
再次運行就不會報錯了