Deploy Django to Heroku - Push rejected

1

I'm trying to deploy a Django app in Heroku. When I execute the git push heroku master command the following appears:

(uleague) ➜ pickapp git:(master) ✗ git push heroku master
Counting objects: 195, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (92/92), done.
Writing objects: 100% (195/195), 516.34 KiB | 0 bytes/s, done.
Total 195 (delta 93), reused 195 (delta 93)
remote: Compressing source files... done.
remote: Building source:
remote: 
remote: 
remote: ! Push rejected, no Cedar-supported app detected
remote: HINT: This occurs when Heroku cannot detect the buildpack
remote: to use for this application automatically.
remote: See https://devcenter.heroku.com/a...
remote: 
remote: Verifying deploy...
remote: 
remote: !   Push rejected to shielded-crag-57385.
remote: 
To https://git.heroku.com/shielde...
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/shielde...
(uleague) ➜ pickapp git:(master) ✗

I have the following directory structure:

I've been following the Getting Started guide  in Heroku for Python and Django and it is understood that there is a file requirements.txt but not a folder requirements / base.txt / development.txt

Will this have something to do with it? Since when I do the push, the first thing that begins is the process of installing the depennecias.

Would this have anything to do with my error?

UPDATE

I deleted the requirements / directory that I had in the root of my Django project and created a single requirements.txt file in the root of my Django project and I get the same result:

(uleague) ➜  pickapp git:(master) ✗ git remote -v
heroku  https://git.heroku.com/fuupbol.git (fetch)
heroku  https://git.heroku.com/fuupbol.git (push)
origin  https://[email protected]/bgarcial/pickapp.git (fetch)
origin  https://[email protected]/bgarcial/pickapp.git (push)
(uleague) ➜  pickapp git:(master) ✗ git push heroku master
Counting objects: 195, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (92/92), done.
Writing objects: 100% (195/195), 516.34 KiB | 0 bytes/s, done.
Total 195 (delta 93), reused 195 (delta 93)
remote: Compressing source files... done.
remote: Building source:
remote: 
remote: 
remote:  !     Push rejected, no Cedar-supported app detected
remote: HINT: This occurs when Heroku cannot detect the buildpack
remote:       to use for this application automatically.
remote: See https://devcenter.heroku.com/articles/buildpacks
remote: 
remote: Verifying deploy....
remote: 
remote: !   Push rejected to fuupbol.
remote: 
To https://git.heroku.com/fuupbol.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/fuupbol.git'
(uleague) ➜  pickapp git:(master) ✗ 

I also tried to leave my requirements / directory and have a requirements.txt in my root and then tell it -r requirements / production.txt which calls the base.txt (with the directory structure presented first in this question) and I did not get results either, it was the same mistake.

I do not know if I'm doing the right thing.

    
asked by bgarcial 18.03.2016 в 21:57
source

1 answer

3

When you do push to heroku, what heroku does is to look for a buildpack that can understand the application that you are deploying, for that the detect file of each buildpack is executed and the first one that is successful is the one that is assigned as buildpack of your application.

In the case of python, the detect looks for the requirements.txt file or the file setup.py, if none of those files is present, heroku considers that your project is not python and continues testing.

You should add one of those files to the root of your application.

    
answered by 24.03.2016 / 02:16
source