Jump to ratings and reviews
Rate this book

Two Scoops of Django

Two Scoops of Django: Best Practices for Django 1.8

Rate this book
Two Scoops of Django: Best Practices For Django 1.8 is chock-full of even more material that will help you with your Django projects.

We'll introduce you to various tips, tricks, patterns, code snippets, and techniques that we've picked up over the years.

We have put thousands of hours into the third 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
Chapter 6: Model Best Practices
Chapter 7: Queries and the Database Layer
Chapter 8: Function- and Class-Based Views
Chapter 9: Best Practices for Function-Based Views
Chapter 10: Best Practices for Class-Based Views
Chapter 11: Form Fundamentals
Chapter 12: Common Patterns for Forms
Chapter 13: Templates: Best Practices
Chapter 14: Template Tags and Filters
Chapter 15: Django Templates and Jinja2
Chapter 16: Building REST APIs
Chapter 17: Consuming REST APIs
Chapter 18: Tradeoffs of Replacing Core Components
Chapter 19: Working With the Django Admin
Chapter 20: Dealing with the User Model
Chapter 21: Django's Secret Sauce: Third-Party Packages
Chapter 22: Testing Chapter of Doom!
Chapter 23: Documentation: Be Obsessed
Chapter 24: Finding and Reducing Bottlenecks
Chapter 25: Asynchronous Task Queues
Chapter 26: Security Best Practices
Chapter 27: Logging: Tips and Tools
Chapter 28: Signals: Use Cases and Avoidance Techniques
Chapter 29: What About Those Random Utilities?
Chapter 30: Deployment: Platforms as a Service
Chapter 31: Deploying Django Projects
Chapter 29: Identical Environments: The Holy Grail
Chapter 32: Continuous Integration
Chapter 33: The Art of Debugging
Chapter 34: Where and How to Ask Django Questions
Chapter 35: Closing Thoughts
Appendix A: Packages Mentioned In This Book
Appendix B: Troubleshooting
Appendix C: Additional Resources
Appendix D: Internationalization and Localization
Appendix E: Settings Alternatives
Appendix F: Working with Python 3
What is everyone saying about Two Scoops of Django?



I read the first edition cover to cover. The second one raises the bar again. It's pedagogical, entertaining, and thoughtful. -- Aymeric Augustin, Django core developer.

A single read-through of Two Scoops of Django gave me so many lightbulbs and tips; I had to go back for a second helping. -- Lynn Root, Spotify engineer, PSF Director, and PyLadies ambassador.

Make sure you have your favorite project next to you while reading. You'll be doing some rewriting. -- Bryan Veloso, GitHubber, PyCon PH Keynote Speaker

You know those lessons you learn when projects blow up in your face? This book contains several projects worth of such lessons. -- Lennart Regebro, author of "Porting to Python 3"

This is the book I wished had existed and I could have read when I started to really build Django projects. -- Barry Morrison, Linux systems engineer and Django developer

532 pages, Paperback

First published April 29, 2015

29 people are currently reading
266 people want to read

About the author

Daniel Roy Greenfeld

17 books62 followers
Over the course of his life, Daniel has:

* Studied history
* Learned how to fight with swords
* Ridden horses
* Cycled thousands of miles
* Performed cartwheels in capoeira circles on multiple continents
* Worked as an engineer at NASA
* Married a woman he dreamed about before he ever met her

He believes this combination of skills and experiences makes him the ideal fantasy and tech author.

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
149 (59%)
4 stars
77 (30%)
3 stars
21 (8%)
2 stars
4 (1%)
1 star
1 (<1%)
Displaying 1 - 22 of 22 reviews
1 review1 follower
May 5, 2015
The authors updated the book this morning and I decided to reward their favor with a review.

This book is excellent. Good best practice guidelines for Django delivered with ice cream and examples from personal experience. I'm very happy this is released, it even better than the previous editions. The book is easy reading, but dense information. I love the cover and the interior drawings. If i had a complaint it would be I want more drawings!
8 reviews5 followers
May 20, 2015
Great book - I was initially scared it'd be to difficult for me because I'm a beginner but the book helped me by not only getting a better understanding of Django but also showing many tips and useful packages I'll definitely use on my Django journey! Can't wait for the paperback!
Profile Image for Gaston Keller.
48 reviews
July 30, 2015
So far, the book is as great as its previous editions. I'll update the review as I progress in my reading.
5 reviews3 followers
August 29, 2016
Anything less than 5 stars just feels wrong!
Profile Image for Edward.
26 reviews1 follower
May 26, 2020
Updated version - still a great resource. Excellent coverage of key areas to develop in Django.
4 reviews
July 4, 2021
Very good source of django framework knowledge specially for mid or senior developers. Covers from django specificities to good practices on deployment of django projects.
Profile Image for Max Malysh.
6 reviews
March 13, 2017
Excellent. Considering yourself a django developer? Go read it, you won't regret it.
Profile Image for William.
69 reviews
February 9, 2017
Great book full of useful tips and tricks for doing Django the "right" way.
Profile Image for Chitrank Dixit.
37 reviews2 followers
October 26, 2016
Two scoops of django 1.8 is the best book if you want to know how to effectively use django 1.8, for the django developers it teaches the best practices to follow in django to make your code and project structure better. It explains about django's templates, tests, views, models and making rest api's using django rest framework. Therefore it covers almost every aspects of developing application using django, a must read book for the django developers
Profile Image for Phin Jensen.
43 reviews1 follower
June 7, 2016
Lots of useful information in this book. It's important to know that this is not a Django guide or reference; it's a collection of best practices. It really helps when you're not sure if you're doing something the right way, but if you're looking for a book to learn Django from the ground up, this is not it.
28 reviews1 follower
December 27, 2016
What a cracker of a book. These two python evangelists are outstanding. The best technical book I have read. This is a book about principles and the section on testing was really useful. I think I should show my team. I have 1.6 currently, but will get 1.8.
Profile Image for Michael.
36 reviews7 followers
December 23, 2016
I don't program in Django, but read this book for entertainment and to get a glimpse of Django world. Really enjoyed it. It provides great overview of modern web development landscape with a focus on single technology stack.
Profile Image for snpefk.
78 reviews6 followers
September 17, 2018
Уау! Книга по проге, которую можно читать, как настоящую книгу, а не как выжимку из доков! Тем не менее Django перестал представлять для меня интерес, так что уже к середине мне стало скучно. Но дело не в тебе, а во мне.
2 reviews
January 10, 2016
Awesome best practices guide for contemporary django. Still good for learning django 1.9, and a great reference book to keep around.
Profile Image for Adam Hernandez.
2 reviews3 followers
April 8, 2017
This book was recommended by a co-worker and I am infinitely grateful for the wisdom passed on by the authors. It provides a fantastic foundation for Django best practices.

Although the physical book may appear daunting in size, the chapters are incredibly manageable to consume. I steadily read a chapter or two a day with ease.
3 reviews
April 26, 2017
Very solid book on how to use the Django framework for creating fully functional websites. As a beginner to web development a lot of the concepts went over my head, so I would suggest for any newbies that you read a book that teaches you how to use the Django framework before reading this one.

As far as giving an intermediate to advanced view of how Django works on a conceptual, this book is excellent. It even goes beyond covering conceptual knowledge of Django and shows how Django works inside of a framework of apps for deploying websites.
Profile Image for César Bustíos.
319 reviews112 followers
May 3, 2017
Daniel and Audrey are amazing. This was really, really good. So much information and good practices gathered on the same book. A must-read for Django developers.
Displaying 1 - 22 of 22 reviews

Can't find what you're looking for?

Get help and learn more about the design.