3

I'm learning Django for the first time and I'm also relatively new to Python. On the Django documentation, it says,

"You’ve started the Django development server, a lightweight Web server written purely in Python. [...] don’t use this server in anything resembling a production environment. It’s intended only for use while developing."

Why shouldn't I use the Django server for production? Why do I need a separate server? I'm from a Node/Express background, and when I created an Express application, I could just deploy it to Heroku without doing too much. How will this be different for Django?

Human Cyborg Relations
  • 1,202
  • 5
  • 27
  • 52
  • 4
    Possible duplicate of [Using Django's built in web server in a production environment](https://stackoverflow.com/questions/4867793/using-djangos-built-in-web-server-in-a-production-environment) – Thierry Lathuille Feb 28 '19 at 12:52
  • 1
    It's not different. You can indeed "just deploy to Heroku without doing too much". You just don't use the development server for that. – Daniel Roseman Feb 28 '19 at 12:59
  • Express apps use Node's api and server behind the scenes to serve connections, hence it's already production ready. Whereas the built-in Django server is created just for the sake of development, with no emphasis on security or efficient threading etc. – xyres Feb 28 '19 at 13:19

1 Answers1

-3

Because of security and performance reasons. It's only meant to be used while developing.

dan-klasson
  • 13,734
  • 14
  • 63
  • 101