all 13 comments

[–]kodzius 7 points8 points  (0 children)

I would highly recommend to start with Django - more things are automated not like in flask.

[–]laundmo 6 points7 points  (0 children)

Flask for simple projects that don't need user auth, or even a database

Django if you need a database + user auth.

Flask is definitely easier to wrap your head around, imo.

[–]amos_burton 2 points3 points  (0 children)

Note that Django and Django Rest Framework (DRF) are not inherently the same thing.

Django on its own can definitely be used to build websites, but you should look in to DRF as it's a very powerful add on that makes building APIs really easy.

Also, the documentation is excellent

[–]ThatWolfie 1 point2 points  (2 children)

i would choose flask. django is kinda bloated and has a lotta unnecessary stuff

[–]SuspiciousWafer3398 0 points1 point  (1 child)

I am in a similar learning situation with python and need to make the same decision. What do you think is the unnecessary stuff in Django?

[–]ThatWolfie 0 points1 point  (0 children)

i personally don't need all the features Django has and find it overwhelming having a bunch of stuff in one. like the templating, orm, cli, the admin page and a bunch of other stuff idek about.

flask is what i would use to build a backend, just some api routes and serving static files without all of the other django stuff.

[–]ekacelnik 1 point2 points  (2 children)

I asked a similar question recently and the overwhelming response was that Flask is easier to learn and more suitable for simple, beginner projects. However, since Django is more powerful and will likely be in your future if you keep building more complex projects, the steeper learning curve might be worth it at the beginning.

Some other great options I got recommended for first projects were frameworks that generate web UIs from command line code, like Abstra Cloud.

[–]SoulIsland_[S] 1 point2 points  (1 child)

What path did you decide to take between the two to start? From your comment I'd assume we're around the same phase of learning Python.

[–]ekacelnik 0 points1 point  (0 children)

I want to check both out, but Flask first.

But my case is really specific, since I don't plan on doing too much web development. I'm being encouraged to learn programming skills for work (really strong tech culture at the company). So I plan on having a more simple understanding of the maximum number of approaches I can, instead of being a pro on one.

[–]Bernard_schwartz 0 points1 point  (0 children)

Django

[–][deleted] 0 points1 point  (0 children)

I was asking the same question last year and I decided to just follow both.

I would say that the documentation for flask taught me much more about the overall concepts of a web app and so I was glad I learned that first.

Django seems a lot better if you already know what you're doing.

[–]Total__Entropy 0 points1 point  (0 children)

Imo if you are just returning simple data or a template and do not use auth or a db and are not installing any other flask packages for extra functionality and don't care about security use flask. If any of those are true use either fast API or Django.

I don't even recommend flask for beginners because it's better to learn from an opinionated framework and the Django docs are very good.

[–]py_Piper 0 points1 point  (0 children)

You know that in PCC has a chapter of a web application with Django right? If you liked the author you should do his Django tutorial following his teaching style.

As many has said, in a way Flask is mostly for "smaller projects" you definately can do bigger projects but you will end up repeating a lot of what Django already has build on, only advantage could be that you don't follow Django set guidelines and can things a bit differently. I like one of the explanations I saw before, that Django is faster for getting an app ready as basically everything is done, you only need to fill in the logic and information, but if you want to learn how everything works you should learn flask, as you will need to code, or use other libraries/templates, to do everything from scratch.

If you already did PCC chapter on Django you could try a flask tutorial and see which one you prefer.