![](/img/trans.png)
[英]Django "Exception has occurred: ImproperlyConfigured Requested setting DEBUG, but settings are not configured..." even after setting in manage.py
[英]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.