Kam
Kam

Reputation: 6008

Do Django and Flask need separate web-servers to run a web application?

I have been reading on their respective website (Django and Flask) about what do they do and what they offer .

I realized the following:

  1. Both are web application frameworks: They help and speed up the application dev time.

  2. They provide rendering to html from python/html templates (please correct me if I'm wrong)

  3. I was able to see that with a minimalist Flask hello world application, the user was able to select the local host port and view the html from browser.

Point 3 led me to believe that Flask comes with its integrated webserver that renders html. Is this capability available in Django? Or does Django require a separate server (Apache for instance) running?

Please help me clarify this confusion. I am trying to understand the difference in the word "web framework"

Upvotes: 1

Views: 1569

Answers (1)

Daniel Roseman
Daniel Roseman

Reputation: 599590

Both Django and Flask use a Python-based server when running in development (Django bundles its own, Flask relies on the third-party Werkzeug library). However, neither of these are suitable for running in production: they will need a proper server - suitable candidates include Apache/mod_wsgi, or nginx proxied to gunicorn or uWSGI.

Upvotes: 6

Related Questions