What People Are Saying

"Finishing the book #Django Design #Patterns and #BestPractices write by @arocks, totally recommended awesome book, worth every dollar."

"Just read "Django design pattern and best practices", efficient, easy to read and well organized around key area."

"I highly recommend this book to people who have completed the infamous polls tutorial as it represents a great survey of topics that the beginner would greatly benefit from using in practice."

"I am loving the book. Very interesting and easy to follow method of explaining Django. For me quite a big jump in Django understanding"

"This book will save a lot of time. It has various design patterns to solve everyday problems while building web apps. It also engages readers with stories & examples to get a better understanding of concepts."

"Extremely well written"

Where to Buy?




About the book

Django Design Patterns and Best Practices is written for new and experienced Django developers. Some of its highlights are:

  • Guides advanced beginners to web application fundamentals and patterns
  • Covers Django 1.8
  • Read about the creation of a fun project - a social network for superheroes
  • Uses engaging story elements to illustrate real world challenges
  • A short read at about 200 pages

Mailing List

Please join the book's mailing list to stay updated on offers, updates or any new content about the book


A chapter-wise breakdown of the book.

Or read the sample chapter from the O'Reilly site

  • Chapter 1, Django and Patterns

    helps us understand Django better by telling us why it was created and how it has evolved over time. Then, it introduces design patterns, its importance, and several popular pattern collections.
  • Chapter 2, Application Design

    guides us through the early stages of an application life cycle, such as gathering requirements and creating mockups. We will also see how to break your project into modular apps through our running project—SuperBook.
  • Chapter 3, Models

    gives us insights into how models can be graphically represented, structured using several kinds of patterns, and later altered using migrations (built into Django 1.7).
  • Chapter 4, Views and URLs

    shows us how function-based views evolved into class-based views with the powerful mixin concept, familiarizes us with useful view patterns, and teaches us how short and meaningful URLs are designed.
  • Chapter 5, Templates

    walks us through the Django template language constructs explaining their design choices, suggests how to organize template files, introduces handy template patterns, and points to several ways in which Bootstrap can be integrated and customized.
  • Chapter 6, Admin Interface

    shows us how to use Django's brilliant out-of-the box admin interface more effectively, and several ways to customize it, from enhancing the models to improving its default look and feel.
  • Chapter 7, Forms

    illustrates the often confusing forms workflow, different ways of rendering forms, how to improve a form's appearance using crispy forms and various applied form patterns.
  • Chapter 8, Dealing with Legacy Code

    tackles the common issues with legacy Django projects, such as identifying the right version, locating the files, where to start reading a large codebase, and how to enhance legacy code by adding new functionality.
  • Chapter 9, Testing and Debugging

    gives us an overview of various testing and debugging tools and techniques, introduces test-driven development, mocking, logging, and debuggers.
  • Chapter 10, Security

    familiarizes you with various web security threats and their countermeasures, and especially with how Django can protect you. Finally, a handy security checklist reminds you of commonly overlooked areas.
  • Chapter 11, Production-ready

    introduces a crash course in deploying a public-facing application beginning with choosing your web stack, understanding hosting options, and walking through a typical deployment process. We go into the details of monitoring and performance at this stage.
  • Appendix, Python 2 versus Python 3

    introduces Python 3 to Python 2 developers. Starting off by showing the most relevant differences, while working in Django, we then move on to the new modules and tools offered in Python 3


If you find any errors in the book's text, please tweet to @arocks. If you find any bugs or issues in the code, please raise an issue in the superbook Github repository.

You are also welcome to share your suggestions or feedback about the book by tweeting to @arocks