Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running a production server #4

Open
hakim89 opened this issue Aug 11, 2015 · 3 comments
Open

Running a production server #4

hakim89 opened this issue Aug 11, 2015 · 3 comments

Comments

@hakim89
Copy link

hakim89 commented Aug 11, 2015

i see you have gunicorn in the requirements.txt but i can't seem to able to run the application using gunicorn ? any help ?

@marcuskelly
Copy link

I am also having trouble deploying this app. I tried on PythonAnywhere and Heroku. I am getting a 404 on both. Anyone any ideas?

@ghost
Copy link

ghost commented Aug 17, 2017

This is due to not calling init_app in manage.py. I fixed this by changing manage.py to be:

# This file starts the WSGI web application.
# - Heroku starts gunicorn, which loads Procfile, which starts manage.py
# - Developers can run it from the command line: python runserver.py

from app.init_app import app, init_app, manager

init_app(app)

# Start a development web server, processing extra command line parameters. E.g.:
# - python manage.py init_db
# - python manage.py runserver
if __name__ == "__main__":
    manager.run()

@marcuskelly
Copy link

This worked for me.

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants