![]() ![]() There is another reason to use gunicorn directly - you can use it with Working directory: /Users/craig/PycharmProjects/MyDjangoApp.Script: /Users/craig/.virtualenvs/blogenv/bin/gunicorn (your virtualenv of choice).Running in P圜harm you need to create a Python run configuration, notĭjango, and provide the following information: You can drop in any gunicorn options you like as well. From your virtualenv run gunicorn -b 192.168.1.1:9000 gi:application, where myproject is your Django project When using gunicorn direct you do not need to list gunicorn in your INSTALLED_APPS. It a wsgi application, handily django is wsgi ready and from 1.4 includesĪ wsgi file when you create a new project (look for wsgi.py in your To access all gunicorn options you need to run gunicorn direct and feed run_gunicorn is a helperįunction that gunicorn adds to manage.py. Unfortunately, I found notĪll gunicorn options can be specified via this, which can be annoying. You need edit your django run configuration and tick the “run customĬommand” box. To your INSTALLED_APPS in your settings.py - Easy.įrom the command-line you might do. Installation is a breeze, pip install gunicorn and add gunicorn It also features integration with Django soĬan be a drop in replacement for runserver. To development here (what I use for production will feature in another Gunicorn can be used on preprod or production sites as well, but I stick Itĭoes not get much attention from the Django developers, lets face it It goes without saying you would never want to deploy any productionĬode with this as it doesn’t scale nor is it particularly secure. Which is a lightweight webserver bundled with Django, see more ![]() When you develop projects with Django it comes with a handy runserver ![]()
0 Comments
Leave a Reply. |