12

Following the Heroku tutorial but I have already created a rather complex Django app that I want to upload. I have copied it to a fresh folder and issued git init successfully, along with adding the files to a commit. I do heroku create --stack cedar so I get a site then issue the git push heroku master. I get the following:

Counting objects: 6756, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (5779/5779), done.
Writing objects: 100% (6756/6756), 6.98 MiB | 953 KiB/s, done.
Total 6756 (delta 2210), reused 0 (delta 0)

-----> Heroku receiving push
-----> Removing .DS_Store files
-----> Python app detected
 !     Django app must be in a package subdirectory
 !     Heroku push rejected, failed to compile Python app

To [email protected]:sitename.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to '[email protected]:sitename.git'

Inside the Heroku folder I have my init, settings, manage, and urls.py then I have the folder OmniCloud_App which holds that particular app's admin, models, Templates (folder), static (folder), tests, urls, and views. Why doesn't Heroku recognize the app?

1
  • Chris, thank you for showing me that Heroku now supports django! I've specifically looked for heroku alternatives not long ago... this is great / will be watching. Nov 2, 2011 at 6:49

2 Answers 2

19

Chris,

Specifically for Django heroku expects you to check in the directory that your Django project lives in (this directory should live at the same level as your requirements.txt). An ls might look something like:

$ ls
requirements.txt appfolder
$ ls appfolder
__init__.py   manage.py   settings.py    urls.py

This should allow you to deploy an existing app then configure your Procfile as needed.

2
  • 1
    I tried this so ls Heroku would yield: requirements.txt and Django_App ls Django_App would yield: manage.py, settings.py OmniCloud_App, etc. and OmniCloud_App contains the specific views, urls, models etc. Still no luck (same error)
    – Chris
    Nov 2, 2011 at 4:29
  • 7
    For anyone else who may run into this problem, I also was receiving a "no Cedar-supported app detected" error. Turns out I had forgotten to add my requirements.txt to the commit. Apr 9, 2012 at 21:57
1

I have a sample Django application that I've deployed to Heroku here: https://github.com/synedra/django-linkedin-simple

I have a blog post on deploying this system to heroku here: http://www.princesspolymath.com/princess_polymath/?p=511

Note that my post was more about getting the auth working. The Heroku Django tutorial itself (linked from my blog post) should be more than sufficient. You might walk through that and then see where your setup differs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.