繁体   English   中英

Heroku Django ModuleNotFoundError:没有名为“my_app”的模块

[英]Heroku Django ModuleNotFoundError: No module named 'my_app'

My app (called 'my_app") in Django seems to be present on the Heroku Postgres database, and my_app is running when I python manage.py runserver from the command line. However when I run my_app in Heroku I get the error ModuleNotFoundError: No module named 'my_app'

我还在[ERROR] Exception in worker process

我查看了需求文件和 procfile,但没有发现任何问题。 我还阅读了我用来开发这个应用程序的教程,我一辈子都找不到任何问题。

Basic file structure looks like this:

my_app todo_app wsgi.py settings.py

 todo_list
      Procfile
      requirements.txt
      manage.py

编辑您的 Procfile 并将 my_app 更改为您的 wsgi.py 文件所在的路径/文件夹。

web: gunicorn YOURFOLDER.wsgi

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM