[Chicago] Heroku and Django
Daniel Fehrenbach
dnfehrenbach at gmail.com
Tue Feb 4 19:43:37 CET 2014
Hi all,
I am working on getting a new Django app up and running on Heroku and I've
run into some trouble. I'm new to Django (having does most of my other work
in Flask) and I'm trying to follow the recommendations in Two Scoop of
Django for organizing the project, with an extra top level directory. When
I do this though it's not clear to me where the Heroku Procfile and the
projects wsgi.py should go so that it's noticed by Heroku and able to
cleanly import the rest of the projects apps.
With my current set up, with the Procfile in the top directory foreman will
load the site but will fail on the first request. It seems like either
heroku/foreman can't find the settings.py file or if it can that it can't
import any other apps from the project. Is this a path issue?
What is the proper set up for this kind of project?
The current organization looks like this. If it's unclear there is gist
version here https://gist.github.com/dnfehren/8809238.
/systeml_project
/.git
.gitignore
Procfile
/requirements
base.txt
fake_requirements.txt
/systeml
manage.py
/forecast
models.py
views.py
urls.py
/inventory
models.py
views.py
urls.py
/systeml
/settings
base.py
models.py
views.py
settings.py
urls.py
wsgi.py
Procfile contents...
web: gunicorn systeml.systeml.wsgi
wsgi.py contents...
import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE",
"systeml.systeml.settings.base")
from django.core.wsgi import get_wsgi_application
from dj_static import Cling
application = Cling(get_wsgi_application())
Email sucks for trying to ask this kind of question with all the extra
details so if I can provide more information in another way let me know - I
would really appreciate any help that's available.
thanks very much,
Dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/chicago/attachments/20140204/9bdb2ecf/attachment.html>
More information about the Chicago
mailing list