I am trying to host my django application on heroku for the first time and i am successfully able to deploy it but i am facing an application error and is showing me this image of my heroku webpage and when i check the logs using heroku logs --tail
its showing me this error log details.
In it what it shows ModuleNotFoundError: No module named 'twitter_project' here 'twitter_project' is the name of my project. I did pip install django-heroku
and pip install gunicorn
and imported import django_heroku
at the top of settings.py
and added django_heroku.settings(locals())
at the end of settings.py
, added a Procfile
which contains this web: gunicorn twitter_project.wsgi
and the requirements.txt
is also complete and have added django-heroku==0.3.1
and gunicorn==20.0.4
as well, I don't know what I am doing wrong. I don't if I have something wrong with my static files.
Here is the structure of my project
C:.
| as.txt
| out.doc
|
+---twitter_project
| | db.sqlite3
| | manage.py
| | Procfile
| | requirements.txt
| |
| +---home
| | | admin.py
| | | apps.py
| | | models.py
| | | tests.py
| | | urls.py
| | | views.py
| | | __init__.py
| | |
| | +---dash_apps
| | | \---finished_apps
| | | | simpleexample.py
| | | |
| | | \---__pycache__
| | | simpleexample.cpython-37.pyc
| | |
| | +---migrations
| | | | __init__.py
| | | |
| | | \---__pycache__
| | | __init__.cpython-37.pyc
| | |
| | +---static
| | | \---home
| | | \---img
| | | | negative_dettol.png
| | | | positive_dettol.png
| | | |
| | | \---bg
| | | 215771.jpg
| | | q1w2e3.jpg
| | | qwer.jpg
| | | qwer1.jpg
| | | twitter-bird.jpg
| | |
| | +---templates
| | | \---home
| | | home.html
| | | welcome.html
| | |
| | \---__pycache__
| | admin.cpython-37.pyc
| | apps.cpython-37.pyc
| | models.cpython-37.pyc
| | urls.cpython-37.pyc
| | views.cpython-37.pyc
| | __init__.cpython-37.pyc
| |
| +---static
| | +---admin
| | | +---css
| | | | | autocomplete.css
| | | | | base.css
| | | | | changelists.css
| | | | | dashboard.css
| | | | | fonts.css
| | | | | forms.css
| | | | | login.css
| | | | | responsive.css
| | .
.
.
.
.
something like this
Here is the snippet of the installed appsinstalled apps