尝试调试代码时出现以下错误:
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中的当前文件
相关问题 更多 >
编程相关推荐