RSS feed

Published on 01 December 2024 Author Adam Parr


Book Review: Django 5 by Example

FieldDetails
TitleDjango 5 By Example
AuthorAntonio Melé
Published2024
ISBN-13978-1805125457

Overview

Why I chose it

I was looking to increase my breadth of knowledge in Django, and go beyond the APIs that I had already built in the past. Most courses didn’t have the depth or breadth I was looking for.

This book takes you through four example projects that are well-structured and non-trivial:

Who it’s for

In my opinion, this is not a beginner book. It does target the core functionality of Django to begin with, including the app structure, admin site, models, views, forms, and templates. That said, it would be helpful to have a practical understanding of these elements beforehand, particularly from the official Django tutorial 1 and possibly the Django Girls tutorial 2.

This book would be perfect for anyone who has followed at least one tutorial and is looking to close gaps in their knowledge, or someone who uses Django as a REST API but hasn’t yet touched Django’s routing, views, forms, or templates.

Reflection

Django 5 By Example offers an impressive range of topics for its size, including four solid projects. Although the last page of substance is around page 760, I managed to complete the book in about six weeks, at a pace of around 20 pages per day.

I had already used Django with Django REST Framework to serve JSON, and built a couple of small applications using MVT architecture. I definitely benefited from the repetition by creating several applications in such a short space of time. I now appreciate the value of views, forms, and templates much more than I did before.

You will get the opportunity to use a wide variety of features, such as forms (including ModelForm for simple cases), and function- and class-based views. You will be comfortable with routing, configuring settings.py, and integrating third-party services for authentication and payments.

One of the great parts about this book is that the code actually works. There is very little ambiguity as the book is explicit on what to do next. The projects are end-to-end and self-contained, so there are no loose ends (although you are free to add more features if you wish).

Strengths

Weaknesses

Further Exploration

I would recommend exploring the following topics to complement this book:

Conclusion

This book really lives up to its name; it teaches you Django using four great examples. It won’t teach you version control or testing, but it will allow you to push out applications quickly.

I would recommend this book to anyone to wants to explore Django in more depth, or become more confident and productive with the core of Django’s feature set. Pair this up with some resources on testing (such as unittest and Pytest) for best results.

You can view my versions of the example projects on GitHub (just search for example).

Footnotes

  1. Django polls tutorial

  2. Django Girls tutorial

  3. Pro Git book

  4. Rails Conf 2013: The Magic Tricks of Testing by Sandi Metz

  5. Kraken coding conventions

  6. HackSoft Django style guide


django book-review