The best books on Django for building solid web apps in Python

Who am I?

I’ve been dabbling in Python for the last 22 years. I am a regular speaker at Pycon India ever since its inception. Most of my talks are related to Django. I host where I write tutorials, and articles and publish screencasts on several Django and Python topics. My initial screencast titled "Building a blog in 30 mins with Django" is one of the most popular screencasts for beginners in Django. I’m a developer member of the Django Software Foundation.

I wrote...

Django Design Patterns and Modern Best Practices

By Arun Ravindran,

Book cover of Django Design Patterns and Modern Best Practices

What is my book about?

Many technical books are comprehensive but they assume you already know a lot. Django Design Patterns and Best Practices not only sheds light on Django, but also starts from the very fundamentals concepts of building maintainable web applications like database design and working with legacy code.

You’ll start with building a fun superhero project by gathering the requirements, creating mockups, and setting up the project. Through project-guided examples, you’ll explore the Model, View, templates, web security, and monitoring techniques. Rather than sticking to GoF design patterns, the book examines higher-level patterns. Using the latest version of Django and Python, you’ll learn about Channels, API design, and asyncio in a clear and simple language.

Shepherd is reader supported. When you buy books, we may earn an affiliate commission

The books I picked & why

Book cover of Two Scoops of Django: Best Practices for the Django Web Framework 1st Edition

Why did I love this book?

Two Scoops is the bible of Django development. It has the most detailed coverage of the Django web framework including best practices and tips. The book has a delightful ice cream-based theme including delightful illustrations. There are several editions of this book so make sure you have the latest one. Overall a valuable reference. However, this book might be daunting for an absolute beginner.

By Daniel Roy Greenfeld, Audrey Roy Greenfeld,

Why should I read it?

1 author picked Two Scoops of Django as one of their favorite books, and they share why you should read it.

What is this book about?

Two Scoops of Django 1.11 Will Help You Build Django Projects.

In this book we introduce you to the various tips, tricks, patterns, code snippets, and techniques that we've picked up over the years. We have put thousands of hours into the fourth edition of the book, writing and revising its material to include significant improvements and new material based on feedback from previous editions.

Table of Contents

Chapter 1: Coding Style
Chapter 2: The Optimal Django Environment Setup
Chapter 3: How To Lay Out Django Projects
Chapter 4: Fundamentals of Django App Design
Chapter 5: Settings and Requirements Files…

Django for Beginners

By William S. Vincent,

Book cover of Django for Beginners

Why did I love this book?

A beginner-friendly book with very clear writing. Vincent has several books on Django aimed at different levels of expertise. This one has a clear and instructional approach to building simple web applications. It is a little light on concepts and explanation of the requirements, probably intentionally, for which you can rely on other books.

By William S. Vincent,

Why should I read it?

1 author picked Django for Beginners as one of their favorite books, and they share why you should read it.

What is this book about?

Completely updated for Django 4.0.

Django for Beginners is a project-based introduction to Django, the popular Python-based web framework. Suitable for total beginners who have never built a website before as well as professional programmers looking for a fast-paced guide to modern web development and Django fundamentals.

In the book you’ll learn how to:

Build 5 websites from scratch, including a Blog and Newspaper website Deploy online using security best practices Customize the look and feel of your sites Write tests and run them for all your code Integrate user authentication, email, and custom user models Add permissions and authorizations…

Book cover of Lightweight Django: Using REST, WebSockets, and Backbone

Why did I love this book?

This is a very well-written book that covers some less covered areas like how to write the most minimal Django application or integrating with Tornado server. The book is short and quite engaging. This is not exactly a book for an impatient beginner as it takes time to build the concepts. Also, the book might be a bit dated since it was last updated in 2014.

By Julia Elman, Mark Lavin,

Why should I read it?

1 author picked Lightweight Django as one of their favorite books, and they share why you should read it.

What is this book about?

How can you take advantage of the Django framework to integrate complex client-side interactions and real-time features into your web applications? Through a series of rapid application development projects, this hands-on book shows experienced Django developers how to include REST APIs, WebSockets, and client-side MVC frameworks such as Backbone.js into new or existing projects. Learn how to make the most of Django's decoupled design by choosing the components you need to build the lightweight applications you want. Once you finish this book, you'll know how to build single-page applications that respond to interactions in real time. If you're familiar with…

Mastering Django

By Nigel George,

Book cover of Mastering Django

Why did I love this book?

Another book with a detailed coverage of the Django web framework. This is a revised book written originally by Adrian Holovaty and Jacob Kaplan-Moss—the creators of Django themselves. Hence the initial chapters are an excellent in-depth description of how Django works. The remaining parts of the books go into intermediate and advanced topics.

By Nigel George,

Why should I read it?

1 author picked Mastering Django as one of their favorite books, and they share why you should read it.

What is this book about?

Mastering Django is the latest version of Mastering Django: Core—the original, best-selling programmer’s reference for Django.

Mastering Django is not just a revision of the original book—it has been completely rewritten from the ground up to meet the needs of modern Django programmers.

The main goal of this book is to make you a Django expert. By reading this book, you’ll learn the skills needed to develop powerful websites quickly, with code that is clean and easy to maintain.

This book is also a programmer’s manual that provides complete coverage of modern Django version 3 and above.

For developers creating…

High Performance Django

By Peter Baumgartner, Yann Malet,

Book cover of High Performance Django

Why did I love this book?

Building scalable and performant web applications is both an art and a science. This book focused on such techniques and hence goes beyond what most books on Django try to cover. Anyone running a Django site under heavy load will definitely learn a few tips from this book. However, it is light on explanations and expects you to figure out many things from reading the examples.

By Peter Baumgartner, Yann Malet,

Why should I read it?

1 author picked High Performance Django as one of their favorite books, and they share why you should read it.

5 book lists we think you will like!

Interested in python, machine learning, and computer programming?

9,000+ authors have recommended their favorite books and what they love about them. Browse their picks for the best books about python, machine learning, and computer programming.

Python Explore 27 books about python
Machine Learning Explore 37 books about machine learning
Computer Programming Explore 32 books about computer programming

And, 3 books we think you will enjoy!

We think you will like Python Testing with Pytest, Fluent Python, and Python Distilled if you like this list.