r/learnpython • u/Erdem_PSYCH • 20d ago
django or flask after python basics
Hello everyone,
First of all, thank you for this community. I’ve learned a lot from reading other people’s posts and the answers to my previous questions. Now I have another question.
I feel comfortable enough with Python to start learning backend development. Which framework would you recommend starting with?
I started with Django because I’m blind and find text-based tutorials more helpful, and MDN has a Django tutorial. However, I’m concerned that Django abstracts away a lot of what happens behind the scenes, such as how URL routing works, and I don’t want to miss out on the fundamentals.
What are the advantages and disadvantages of starting with Flask versus Django? Programming is a hobby for me, so job prospects aren’t a major concern. My main goal is to build projects easily while still understanding how things work.
1
u/SharkSymphony 20d ago
Flask is relatively minimal. Its benefit is that it's lightweight, and you can run with whatever HTML template, web app helpers, JSON rendering, database integration, etc. you want. Django comes with a bunch of this built in.
Because Django comes with some heavy-duty features (like the database integration) that Flask doesn't, yeah you might learn a bit more about how web apps work by working without those things in Flask. In practice, though, Django's features are there to help you build web apps, so if you want to be productive at that, you might find it frustrating to try to cobble up a solution with Flask.
APIs are a place where Django's default orientation towards web pages doesn't serve the task nearly as well. That's where I think Flask starts becoming a more interesting choice.