DEV Community


Discussion on: Django vs Flask: which one should you choose?

bigj1m profile image
Jean-Michel Plourde

I work on Django projects for the job and have done Flask projects for my classes. Flask is really great for smaller projects, you can get up and running in no time while Django would be an overkill solution and is more geared toward big projects that require lots of robust tooling.

I worked on big projects in both Django and Flask and I have to say to this day, I still haven't worked on a big project where Flask is better suited. Requiring multiple different libraries with different level of supports and documentation makes it sometimes painful to work with Flask. Just an example, you want to do forms: in Flask the most popular lib is Wtforms. It's great and it does the job. But it has some limitations, for example when you want to customize ChoiceField or MultipleChoiceField, you can't do a lot. Yes with Django you have to stick with the tooling, but it is highly efficient, customizable and extensible.

Another thing I don't particularly like in Flask is how you declare your links for your views. While adding decorators to you view functions is visually intuitive especially when you have parameters, I don't like how at some point if you have a lot of views divided in apps you get scattered. Yes there is blueprints, but you just put stuff somewhere else to register and you still have decorators scattered over many functions. I like that in Django you have your by app, you put the path and a reference of your view.

Great write-up btw, this is very informative for someone that can't decide between the two.