Flask vs. Django: Let’s Choose the Right Framework for the Job
blog.soshace.com/en/python/flask-vs-django-le...Posted Oct 23, 2019, 5:46 AM UTC
Posted Oct 23, 2019, 5:46 AM UTC
Django boasts the following design philosophies: Explicit is better than implicit: This approach discourages the use of “magic code” (i.e. code that works even though nobody understands why); instead, readability should trump magic code and clever tricks that condense whole functions into one-liners.
I don't know why, but I feel like this does not really reflect my experience with Django. I do love Django though.
This is great. Only comment would be how maybe covering well they work with JS frameworks and documentation.
I use flask and have chosen Vue for my front end. I feel Vue and Django or Flask would work very well while React apps wouldn’t care so much so you would be more likely to choose a micro framework like flask. I’m not sure though but it would be interesting to hear what people are doing.
Finally, if you are building a CMS type app, maybe Django has a CMS built on top so that would be preferable. I have more experience with PHP and Symfony, but prefer flask and Python (obv) for most projects
I don’t think there’s any automatic integration between React or Vue and Django. JS frameworks really only need an API (which I’ve done with both Django/Django-rest-framework and flask).
For a CMS, there’s a project called Wagtail built on Django.
I tend to reach for Django in most instances because I’ve found that I end up having to build out a large portion of what I would get for free when using Django (DB support, migrations, form parsing/validation, csrf support, caching, etc) for most larger apps. And there isn’t a clear way to organize larger flask apps.
I think they’re both very good projects but I view flask as more of a build your own framework and Django as batteries included.
Django has too many batteries included. Flask's community is good, there are libraries for almost anything that you would need. So unless you're more familiar with Django than Flask, not sure why anyone would work with it by choice.
Heyy, I literally just covered this in class today. Haven’t decided if the timing is creepy or cool haha