Note that only Django core commands are listed as settings are not properly configured (error: Requested setting INSTALLED_APPS,

Note that only Django core commands are listed as settings are not properly configured (error: Requested setting INSTALLED_APPS,,第1张

概述def main(): # os.environ.setdefault(‘DJANGO__MODULE‘, ‘testDjango.settings‘) os.environ.setdefault(‘DJANGO_SETTINGS_MODULE‘,‘testDjango.settings‘) try: from django.core.manageme
def main():  #  os.environ.setdefault(‘DJANGO__MODulE‘,‘testDjango.settings‘)    os.environ.setdefault(DJANGO_SETTINGS_MODulE,testDjango.settings)    try:        from django.core.management import execute_from_command_line    except importError as exc:        raise importError(            "Couldn‘t import Django. Are you sure it‘s installed and "            "available on your PYTHONPATH environment variable? DID you "            "forget to activate a virtual environment?"        ) from exc    execute_from_command_line(sys.argv)if __name__ == __main__:    main()

部署服务器以后 修改  

修改配置    

DJANGO_SETTINGS_MODulE我也不知道为啥。。。。就这么成功了
总结

以上是内存溢出为你收集整理的Note that only Django core commands are listed as settings are not properly configured (error: Requested setting INSTALLED_APPS, but settings are not configured. You must either define the environment全部内容,希望文章能够帮你解决Note that only Django core commands are listed as settings are not properly configured (error: Requested setting INSTALLED_APPS, but settings are not configured. You must either define the environment所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/langs/1191700.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-06-03
下一篇 2022-06-03

发表评论

登录后才能评论

评论列表(0条)

保存