Django vs Flask

Discussions comparing Django and Flask as Python web frameworks, debating their heavyweight vs lightweight approaches, suitability for beginners and projects, and alternatives like Rails or web2py.

📉 Falling 0.3x Web Development
3,600
Comments
20
Years Active
5
Top Authors
#637
Topic ID

Activity Over Time

2007
87
2008
159
2009
168
2010
254
2011
262
2012
263
2013
275
2014
184
2015
155
2016
261
2017
247
2018
189
2019
156
2020
164
2021
204
2022
159
2023
190
2024
106
2025
116
2026
1

Keywords

jeffknupp.com CSS HN simplehttpserver.html python.org MVC ORM ASP web.py LOC django flask python framework rails web ruby rails frameworks ruby python django

Sample Comments

rc4algorithm Jul 1, 2012 View on HN

A lot of people will suggest Django, and it's definitely the most popular Python web framework (and therefore the most useful if you're looking for a job using one). However, Flask is written in a much more open-ended way that gives you a lot more power to create the structure of the application as you see fit. I've been working with it lately, and I'd suggest giving it a try.

pmontra Nov 23, 2016 View on HN

I read in an answer of yours that you're learning Python. I learned Ruby myself with Rails in 2005 because I had no other reason to use Ruby back then. Rails was a much lighter framework than Django is now. I would recommend to start with something very lightweight, get the gist of it and move on to Web2py or Django.What you're looking for could be Flask or even something simpler like<a href="https://docs.python.org/2/library/simplehttpserver.html" rel="n

tesmar2 May 7, 2013 View on HN

As someone who is thinking about doing a python project, should I learn Django or just go with Flask? Any thoughts on those two?

AbhishekBiswal Sep 13, 2014 View on HN

Since you mentioned Django, why not try out Flask?http://www.jeffknupp.com/blog/2014/01/18/python-and-flask-ar...

pdonis May 8, 2020 View on HN

I've tried working with Django and it's always seemed much too heavyweight to me. Flask is my preferred web framework for Python; much easier for me to use and feels like it's helping me where needed and getting out of my way where needed, not weighing me down.

conradfr Jun 7, 2018 View on HN

Isn't Django huge? And there's Flask as well.

bigmanwalter Dec 5, 2016 View on HN

And for anyone going down this path with Python, I recommend taking a look at web2py after Flask.web2py is where I finally settled after trying Django and Flask first. It's got more magic in it than Django, and yet, I found Django felt heavier and more "over-engineered". Flask, on the other hand, is very elegant, but as soon as you start patching together a few different libraries, the cognitive load of needing to understand Flask, WTForms and SQLAlchemy was too much for me.

JodieBenitez Feb 24, 2023 View on HN

Well... no thanks. I've been doing similar apps with Django and Flask. I'll take Django over Flask any day. Way too much fiddling with Flask.

guitarbill Aug 10, 2017 View on HN

I know you didn't list Python, but Django works very well. Bit of a learning curve though. Flask is a microframework (also Python), with emphasis on the micro.Django makes some trade-offs that might make it seem like you're less productive. Maybe it's true, but Django apps are very maintainable in my experience.

davidw Nov 17, 2007 View on HN

Try Rails and see. It's pretty impressive. Django is supposed to be pretty good too if Python is more your thing.