When I try to deploy my app to Heroku then I received:
-----> Building on the Heroku-20 stack
-----> Using buildpacks:
1. heroku/python
2. https://github.com/heroku/heroku-buildpack-static.git
-----> App not compatible with buildpack: https://buildpack-registry.s3.amazonaws.com/buildpacks/heroku/python.tgz
More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure
! Push failed
I've been trying to spend a lot of time. Most of the solution is not working. Is it a buildpack issue or something else? Additionally, I connected my GitHub account to Heroku and tried deploying from the GitHub main branch. However, I still receive the error. Here is my GitHub address: https://github.com/Whitemoon2000/Final-year-project
Why are you using the static buildpack? That isn't normally needed for a Django deployment, and I'm not sure that it makes sense to use a buildpack for hosting static content alongside one for Python.
In any case, when using multiple buildpacks the main buildpack must be declared last:
The buildpack for the primary language of your app should always be the last buildpack in the list. This ensures that defaults for that primary language are applied instead of those for another language, and allows Heroku to correctly detect the primary language of your app.
If you don't actually have a reason to use the static buildpack, you should be able to clear your configured buildpacks and let Heroku detect the right one:
heroku buildpacks:clear
The presence of a requirements.txt, Pipfile, or setup.py file in the root directory of your project will identify it as a Python project.
If you do need that buildpack (or any other) in addition to heroku/python, reorder them, e.g.
heroku buildpacks:remove https://github.com/heroku/heroku-buildpack-static.git
heroku buildpacks:add --index 1 heroku-community/static # shorter name
You can verify that the list is correct with heroku buildpacks.
Note that the static buildpack requires a static.json file. Without that, you'll still get the "app not compatible with buildpack" error.