I was looking at the requirements.txt file of DOs sample Django app (https://github.com/digitalocean/sample-django) and noticed gunicorn is in there. Why?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

Hey there!

Gunicorn typically provides much better performance for Django applications. Without it Django is much slower using their development server as it reloads python code with each request. Django recommends not using their development server for production use cases: Django

Hope it helps!

  • Hello,

    I know gunicorn. I don’t know why I have to include it in my Django project. App Platform should use it at system level.

    • The native python build-pack that is used to run Django is not specific to Django. It has a lot of other use cases for Python apps and not all of those would want or require Gunicorn. We use the cloud-native build packs which can be found here: Python Build-Pack