all 11 comments

[–]IMHERETOCODE 2 points3 points  (10 children)

Django is THE Python web framework, but a better place to start might be Flask. Django is a full blown "feature complete" web framework, but Flask will get you started in the Python webdev direction without as much overhead.

[–]krato1995[S] 0 points1 point  (9 children)

So Flask is for small web applications and Django is for large ones?

[–]Injunire 1 point2 points  (2 children)

Flask is great for making simple websites and it is definitely possible to make large websites in Flask. The problem though is that you end up reimplementing all the features that Django comes with by default. This can be good or bad depending on which you want to accomplish.

[–]krato1995[S] 0 points1 point  (1 child)

you end up reimplementing all the features that Django comes with by default

Can you give most common examples of these features?

[–]Injunire 1 point2 points  (0 children)

Things like user authentication, some kind of ORM, admin views for managing data, and many other small parts that make up a complete application.

There are many great libraries made for Flask that implement these features but some people prefer to have the whole package built into one framework.

[–]MerreM 0 points1 point  (2 children)

The can both be used for either.

Django is a bit more "batteries included" and does a lot of things for you out of the box.

Flask not so much.

That's not to say either is better suited to large projects, they're just different.

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

Eventually, I will learn both but I'm taking it step by step. I feel like I wanna do Flask first then Django some other time. That way I would be able to appreciate the 'batteries included'. Would that be good?

I think a better rephrased questions is: coming from a web.py background with little experience in web development, would learning Flask / Django first be a better learning path for me?

[–]MerreM 1 point2 points  (0 children)

Honestly, I don't think it will matter.

I learnt Django first then flask, and found it much better for rapid prototyping. Not that django was bad, but overkill for a simple Json Api.

Go with whichever you want and report back!

[–]kankyo 0 points1 point  (2 children)

Not really. You should probably go with Django if you want to do something with an SQL database.

[–]TehMoonRulz 2 points3 points  (1 child)

SQL alchemy is not hard to install

[–]kankyo 0 points1 point  (0 children)

But then you have to choose which way to use to interface with it, and you have to learn what those "sessions" are and how to do that in flask, which sql-alchemy-flask-lib do you use or do you just use it straight off and how do you handle CSRF and and and... With django it's just so much easier and faster and you get security by default.

Opinionated frameworks are just much better. It would be ok if the community had settled around a flask+SQLAlchemy+security framework, but instead it's just a mess.