Looking for django Answers? Try Ask4KnowledgeBase
Looking for django Keywords? Try Ask4Keywords

Django Running Django application with Gunicorn


  1. Install gunicorn

    pip install gunicorn

  1. From django project folder (same folder where manage.py resides), run the following command to run current django project with gunicorn

    gunicorn [projectname].wsgi:application -b[port number]

    You can use the --env option to set the path to load the settings

    gunicorn --env DJANGO_SETTINGS_MODULE=[projectname].settings [projectname].wsgi

    or run as daemon process using -D option

  1. Upon successful start of gunicorn, the following lines will appear in console

    Starting gunicorn 19.5.0

    Listening at:[port number] ([pid])

    .... (other additional information about gunicorn server)