Except you, because you are special
Beginners should not use Django or Flask at all. They should use Anvil instead. Fun from the beginning. Learning curve in days, not weeks! Check it out. In the free version you can accomplish a lot.
As an intermediate developer writing his first web app, I spent a fair amount of time trying to decide between Flask and Django. In the end, as a beginner, Django's batteries included approach won the day. Sure, set up is more involved and a certain amount of under-the-hood knowledge is necessary to really make Django sing, but the built-in security features made it more than worth it for me. I had to learn Django, not Django and multiple 3rd party libraries.
Yeah. One other thing - Django's documentation is just outstanding.
Yeah, for a proper webapp, Django is great. Flask ha all these blueprints and other methods, but I could never understand them (and it was easier to just read Django docs). People say Flask extensions are easy to use, but I disagree-- the very 1st step, choosing which ext to use is itself a pain
I will disagree with you on one point-- you are talking about webapps. Maybe its the backgound Im in (Test Automation, mainly in hardware firms)-- but there have been many times we wanted a simple web frontend for internal data,, and Flask is perfect for that. just 1-2 pages that displaysome metrics. These are internal apps so we never cared about usernames or databases-- at most a simple hardcoded password.
FastApi, in case anyone mentions it, is built on the hype and farts of unicorns
This is great advice if you're getting into web development and plan to expose a website to a public/semi-public audience.
I feel the value proposition may tilt in the other direction towards Flask/FastAPI (especially the latter), if you're attempting to write code to expose an API (eg for a microservice) but don't plan to include a website. Thoughts?
Couldn't agree more. When I first started working, I didn't understand why other coworkers were using a framework as versatile as Django in their projects, I chose to use flask and like you said gained extra scars. Over the years of working, I've also seen a lot of people use flask to build projects that are difficult to maintain (most notably ORM, which simply doesn't have a robust ORM extension in flask)
Agree 99%! Django is great framework to start building things. It is daunting at first, but if you starting with tutorials and docs you will have no trouble.
I would add one more thing for beginners that is very useful to do - dig into Django internal code! Use IDE tools to go deep into functions. Read the code. Read the functions docs and looker for other usage of same functions across the internals. It will be super learning experience about how to write great code, how Django works. This knowledge will carry on to future projects and will make you awesome dev!
I agree it's the place to start. I started with Django back in 2006 when it was version 0.9-something, occasionally experimented with the other frameworks. For the last couple of years, the toy projects I spin up for myself and friends these days are simpler and I do those with Flask, Peewee, SQLite, and APSW.
This is correct. Micro-frameworks are the way to go once you know what you are doing. Like *really* know what you are doing. You will be building a "mini-Django" for each project with Flask (or Quart).
It's repetitive, it's time-consuming, but it will give you a lot of control, and it will matter a great deal once the project grows to a size where a framework like Django stops working for you and actually starts being in the way.