Hacker News new | past | comments | ask | show | jobs | submit | liamchzh's comments login

what's the difference between Flask and Django?


Django follows Python's philosphy of "batteries included". In particular, it uses its own ORM. It also has a large ecosystem of pluggable apps, whether contrib modules or outside the Django tree.

Flask is a microframework. It lets you build your website in a single file if that's what you need, or scale up to multiple files/sub-websites if your website is more complex. It doesn't have its own ORM, but it's very easy to use SQLAlchemy (the best ORM/SQL abstraction framework out there, IMHO). Its templating engine (Jinja2) is superior to Django's. On the other hand, the list of plugins available is smaller than Django's.

Both have very good documentation.


Django's a huge, monolithic framework that you need to run a script for that generates some files and a folder strucutre.

Flask is a microframework. You can create a flask app contained entirely in one file, or on spanning several. It requires a minimum of configuration to work.


> Django's a huge, monolithic framework

I'd like that misconception to finally be dispelled. In spite of being installed as an apparently single entity, Django is modular. You can use SQLAlchemy and Jinja2 with Django, and you can use Django's ORM all by itself, or its templating system standalone. You can use Django without manage.py, and while the only actual requirement is settings.py, that is in the process of being done with.


Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: