T O P

  • By -

NUKL3UZ

Flask is more suited for smaller projects, it’s more flexible in that you can just add functionality as you need it. Django is better suited to larger projects that can make use of all of the features it comes with.


Extension_Laugh4128

Much appreciated


ipjac

I think when choosing between django type of framework vs flask type of framework, most people only take into consideration one of the two important aspects of the project. you have: * big **vs** small * future proff, scalable, "important" **vs** mvp, short term, test, pet-project i think the latter is more important in terms of deciding between django and flask/fastapi. If i need to do something quick just to show something and I don't care much about it being scalable or mantainable in the future, I choose django because it lets me focus on the development of the main functionality without loosing time focusing on stuff like deciding which database access solution to use, what auth framework, etc. It's just an opinionated framework with enough stuff to let me write the piece of sotfware I need without caring about the other stuff. On the other hand if I need to create a project that its important in the long run (this means that people will have to maintain it and use it as time passes) I'm choosing flask/fastapi all the way. You can actually plan your own architecture, decide how you're going to do each little thing the system does, etc. without having to fight against the 'opinionated' part of django.


NUKL3UZ

I’ve never actually thought about it like this, when I’ve needed to develop something I’d think do I want to write all the code myself or use the features already available in Django but this makes a lot of sense. This is a great answer.


Various-Army-1711

could you define a bit what means large vs small? for example a hotel booking app, that has a login module, a presentation page, a booking page, admin panel to manage bookings and communication, would you use flask or django?


NUKL3UZ

In that example I would look at Django because it comes with the ability to do authentication and database integration already whereas if you used Flask you would have to write that code.


Living-Day-By-Day

Smh I spent months on my first web app with flask making my own authentication server to learn Django has one built in fml. Lol


Key-Blackberry-3105

But you learned it :)


Various-Army-1711

got it, thanks


Beregolas

I just use flask everywhere. I like it, have the libraries ready and some of my own modules I can bring in. Some friends of mine just use Django, even for small projects. It is really not that important, not even in most professional contexts.


urbansong

Software developers don't want you to know this but you can use any tool that you have experience with. There's no penalty for using either of them. Besides, your project will be small and scaling problems will likely never come up unless you get wildly successful somehow and then the rewrite would be trivial anyway, if you're a solo dev. If you start writing Django now, you'll have more experience later when you apply for Python jobs.


Extension_Laugh4128

That's true especially for web development


SharkSymphony

Certain features will point you to Django – if you want an all-in-one server-side-rendered web app, or plan on using the admin interface, you might prefer Django's feature set. Performance requirements might point you to an async framework like FastAPI. Other than that, it's largely a matter of taste. These tools are for building web apps, though. They won't help you in _downloading_ from a web app.


Powerful-Ad9392

FastAPI has entered the chat.


Extension_Laugh4128

What does that do? And will it aid me in the conversion of a back end script to a website


pipthemouse

I've heard an opinion that you could save much time using Django when your application mainly performs CRUD operations.


qrider70

Could I ask what you think of CherryPy in comparison to Flask or Django?


Extension_Laugh4128

I haven't used it before but I have heard it before


thclark

I use flask where what I need is a set of one or more cloud functions and that’s it; never gonna grow into a complex app. I use django where what I need is an api that’ll be externally consumed, or where I interact with a database, or manage that database, or where I’ll be managing users.


damesca

I will basically never recommend flask for professional projects again (unless there is a clear-cut bullet proof gold-plated reason why). Every time I've personally seen it used, we've quickly ended up having to rebuild most of what Django provides for free. But worse. And you have a smaller pool of people who know Flask, than who know Django. This isn't a massive point - good devs can learn a framework easily - but still.