Foreword
Django: The web framework for perfectionists with deadlines.
I like this tagline because it can be easy for developers to fall prey to perfectionism when having to
deliver workable code on time.
There are many great web frameworks out there, but sometimes they assume too much of the devel-
oper, for example, how to properly structure a project, nd the right plugins and elegantly use existing
abstractions.
Django takes most of that decision fatigue away and provides you with so much more. But it’s also a big
framework, so learning it from scratch can be overwhelming.
I learned Django in 2017, head-on, out of necessity, when we decided it would be our core technology
for our Python coding platform (CodeChalleng.es). I forced myself to learn the ins and outs by building
a major real-world solution that has served thousands of aspiring and experienced Python developers
since its inception.
Somewhere in this journey, I picked up an early edition of this book. It turned out to be a treasure trove.
Very close to our hearts at Pybites, it teaches you Django by building interesting, real-world applications.
Not only that, Antonio brings a lot of real-world experience and knowledge to the table, which shows
in how he implements those projects.
And Antonio never misses an opportunity to introduce lesser-known features, for example, optimizing
database queries with Postgres, useful packages like django-taggit, social auth using various platforms,
(model) managers, inclusion template tags, and much more.
In this new edition, he even added additional schemas, images, and notes in several chapters and moved
from jQuery to vanilla JavaScript (nice!)
This book not only covers Django thoroughly, using clean code examples that are well explained, it also
explains related technologies which are a must for any Django developer: Django REST Framework,
django-debug-toolbar, frontend / JS, and, last but not least, Docker.
More importantly, you’ll nd many nuances that you’ll encounter and best practices you’ll need to be
an eective Django developer in a professional setting.
Finding a multifaceted resource like this is hard, and I want to thank Antonio for all the hard work he
consistently puts into keeping it up to date.
As a Python developer that uses Django a lot, Django by Example has become my GO TO guide, an
unmissable resource I want to have close by my desk. Every time I come back to this book, I learn
new things, even aer having read it multiple times and having used Django for a solid ve years now.
If you embark on this journey, be prepared to get your hands dirty. It’s a practical guide, so brew yourself
a good coee and expect to sink your teeth into a lot of Django code! But that’s how we best learn, right? :)
- Bob Belderbos
Co-Founder of Pybites