[Chicago] Heroku and Django

Marlon Castillo marlon.s.castillo at gmail.com
Tue Feb 4 23:58:40 CET 2014


Do you get any errors when you git push heroku master? Do you see any
errors in your logs when you type heroku logs?

You could also try installing the sentry and new relic add ons to see their
log outputs, in case those could help with troubleshooting.


On Tue, Feb 4, 2014 at 12:43 PM, Daniel Fehrenbach
<dnfehrenbach at gmail.com>wrote:

> 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
>
> _______________________________________________
> Chicago mailing list
> Chicago at python.org
> https://mail.python.org/mailman/listinfo/chicago
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/chicago/attachments/20140204/e9ffa446/attachment.html>


More information about the Chicago mailing list