不支持现象:
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)
更多Python知识,请点击!!
Copyright © 2019- net188.cn 版权所有 湘ICP备2022005869号-2
违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com
本站由北京市万商天勤律师事务所王兴未律师提供法律服务