解决 控制台console导入模型报错 django.core.exceptions.ImproperlyConfigured: Requested setting INSTALLED_APPS, but settings are not configured.

import os

import  django 

os.environ.setdefault(‘DJANGO_SETTINGS_MODULE‘, ‘rookie.settings‘)  # rookie替换你的app应用名称

django.setup()

解决 控制台console导入模型报错 django.core.exceptions.ImproperlyConfigured: Requested setting INSTALLED_APPS, but settings are not configured.

 

 

解决 控制台console导入模型报错 django.core.exceptions.ImproperlyConfigured: Requested setting INSTALLED_APPS, but settings are not configured.

 

解决 控制台console导入模型报错 django.core.exceptions.ImproperlyConfigured: Requested setting INSTALLED_APPS, but settings are not configured.

上一篇:MindNode针对apple M1进行了哪些优化更新?


下一篇:Unity+Android+讯飞离线命令词识别(HLYH)