簡體   English   中英

發生異常:配置不當

[英]Exception has occurred: ImproperlyConfigured

嘗試調試代碼時出現此錯誤:

Exception has occurred: 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.
  File "C:\PyProjects\InstaDriver\users_app\views.py", line 2, in <module>
    from django.contrib.auth.forms import UserCreationForm

錯誤停止我的代碼是這樣的:

在此處輸入圖像描述

你從錯誤的地方開始你的應用程序,你的起點應該是 manage.py,vscode 的默認行為是你在你的 case views.py 中的當前文件

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM