![图片[1]-pycharm不支持django的解决方法-uusu优素-乐高,模型,3d打印,编程](http://uusucn.zbbe.cn/wp-content/uploads/2024/01/5ef15eab954a8266.jpg)
不支持现象:
django.core.exceptions.ImproperlyConfigured: Requested setting CACHES, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MOD
解决办法如下:
1.在需要执行的程序中添加:
import django
django.setup()

2.在pycharm的设置中设置settings路径即可(app.settings)

© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END


















































暂无评论内容