Go Back
Login

Flask versus Django

Published on April 6, 2021 by Tommy Dougiamas

Full-stack versus Light-weight

As someone who previously only had experience with the Flask framework, Django's "batteries included" philosophy has been a breath of fresh air.

For this project I dived into Django's model and template systems to create this simple blog. Django makes it extremely easy to create simple models representing complex table schemas. All it took was a less than 20 lines of Python and I had my blog post and blog comment tables ready to go.

I then created a simple login system. The Django team has made this complex task extremely simple with out of box authentication methods. The excellent documentation of the User class was also very helpful. Adding CSRF tokens to forms for extra security is made simple with the {{ csrf_token }} template tag.

It's been great not swearing every 5 minutes while creating my own HTTP response objects to override limited default behaviours. Flask is good at what it does, but it just doesn't do a whole lot. Give Django a try on your next project.

Comments

tom - April 6, 2021

Testing comment functionality.

Hello, World!

Make an account to create a comment

Tui - April 7, 2021

Nice succinct review! Will be sure to give Django a try.

Moodler - April 9, 2021

Memes

ASS - April 30, 2021

THIS IS EPIC

Potato - April 30, 2021

Great!