简体   繁体   中英

Django Heroku push failing

I'm running accross an error trying to push my Django project up to Heroku and I was looking to see if anyone had any insight.

 !     Heroku push rejected, no Cedar-supported app detected

I am guessing it is because of my folder structure in the git repo but I am not sure. My project is setup like this:

/subfolder/djangoproject/

/subfolder/requirements.txt

My Proc file content looks like this:

web: python manage.py runserver 0.0.0.0:$PORT --noreload --settings=djangoproject.settings.heroku

I have my project setting split and they work fine on my local. (In other words I having a setting directory with an init .py in it.)

I tried this:

/Procfile

and this:

/subfolder/Procfile

but neither worked.

Can this folder structure be the culprit? I was under the impression that the requirements.txt was how Heroku found where the project folder was.

Thanks


I wanted to add my solve for the first issue I had and then post the new issue I am having.

The solve I first did was to move the Procfile and requirements.txt files to the root level of the project. The second thing I did was edit the Procfile in so the path to the manage.py script was to the proper location

web: python subfolder/djangoproject/manage.py runserver 0.0.0.0:$PORT --noreload --settings=djangoproject.settings.heroku

I've hit a new error now when trying to run a syncdb. It seems to go through the process but nothing takes. In other words, if I run syncdb once and then run it a second time, it wants to set everything up all over again. Any thoughts on what I may have configures wrong to make the DB not save it's data? Should I use the setting for the DB from the dashboard or keep this line in the Django config:

import dj_database_url
DATABASES['default'] =  dj_database_url.config()

Thanks

You need requirements.txt or setup.py in the root of the repo.

See https://github.com/heroku/heroku-buildpack-python/blob/master/bin/detect

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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