Two Scoops of Django: Best Practices for Django 1.8 3rd Edition
| Daniel Roy Greenfeld (Author) Find all the books, read about the author, and more. See search results for this author |
| Audrey Roy Greenfeld (Author) Find all the books, read about the author, and more. See search results for this author |
Use the Amazon App to scan ISBNs and compare prices.
Two Scoops of Django 1.11 Now Available!
Search for Two Scoops of Django 1.11 to find and purchase the latest edition.Two Scoops of Django: Best Practices For Django 1.8 is full of 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
Customers who viewed this item also viewed
Customers who bought this item also bought
Editorial Reviews
About the Author
Daniel and Audrey Roy Greenfeld are best known for their open-source community leadership work on the following projects:
- DjangoPackages.com, the Django package index and comparison site.
- Cookiecutter, a Python package for generating projects from project templates.
- Cookiecutter-PyPackage, a project template for creating advanced python projects.
- Cookiecutter-Django, a project template for creating advanced Django projects.
- PyLadies, a women's outreach/mentorship group. Nurturing the group was basically a 2nd fulltime job for them in 2011, and they continue to run monthly Inland Empire PyLadies events.
- Barcamp Django SF, the first Django unconference.
- The first ever PyCon Philippines, a 300-person conference about the Python programming language held in the Philippines.
- The LA Open Source Hackathon event series, which brings together open-source developers from different programming backgrounds.
They do Python and Django development and run a small Python/Django consulting shop called Cartwheel Web. They've spoken at dozens of conferences and have given keynote speeches at DjangoCon Europe, EuroPython, PyCon Poland, PyCon Philippines, PyCon Australia, PyCon New Zealand, Python Brasil, and PyCon Argentina.
I'd like to read this book on Kindle
Don't have a Kindle? Get your Kindle here, or download a FREE Kindle Reading App.
Product details
- Publisher : Two Scoops Press; 3rd edition (May 15, 2015)
- Language : English
- Paperback : 532 pages
- ISBN-10 : 0981467342
- ISBN-13 : 978-0981467344
- Item Weight : 1.99 pounds
- Dimensions : 7.5 x 1.2 x 9.25 inches
- Best Sellers Rank: #1,500,486 in Books (See Top 100 in Books)
- #1,710 in Python Programming
- #4,064 in Computer Programming Languages
- #9,172 in Internet & Social Media
- Customer Reviews:
About the authors

Audrey Roy Greenfeld is best known for being a programmer. She created the popular Cookiecutter project templating tool in 2013, now open source on GitHub with over 10,000 stars. She is one of the primary authors of Cookiecutter Django, one of the most widely-used Django web application project templates. She graduated from MIT in 2005 with a degree in electrical engineering and computer science.
Audrey also has a deep passion for fiction writing. Her Ambria series, co-written with her husband Daniel Roy Greenfeld, explores a magical world where a boy is forced to grow up suddenly and help his family fight dark forces.
Audrey is also an artist. She paints, sculpts, and creates generative art. At one point she was a professional artist with a studio practice in San Francisco and a large client base. Her work has been featured in Wired, Technology Review, CNN, and the New York Times. She now makes art primarily for herself. Her art studio is currently in Los Angeles.
Audrey has co-written 5 fantasy books and 4 technical books with Daniel Roy Greenfeld. She has also written and illustrated a children's book.

Daniel Roy Greenfeld has been writing fiction professionally since 2014. His fantasy novels take you on fast-paced epic adventures through magical lands. Knights, mages, and Greek mythology–inspired gods fight for power, often resulting in death and destruction. Young squires in awkwardly-fitting armor and apprentice mages still learning spells are left to clean up the mess. Dryads talk to trees and negotiate with the dead. Youthful romances blossom, only to be interrupted by invasions by dark legions. Chivalry is alive, and love triumphs over race and class divisions.
Daniel is also an experienced software professional and co-author of a series of Python web development books. He has given keynote speeches at numerous academic and professional Python and Django conferences around the world. Daniel has worked for NASA as a senior software engineer. He has authored various popular open-source utility libraries, which are in production use by thousands of organizations, including Fortune 500 companies.
To learn more about Daniel:
- Main Website: https://www.danielroygreenfeld.com
- Facebook: https://www.facebook.com/DanielRoyGreenfeld
- Twitter: http://twitter.com/pydanny
Customer reviews
Customer Reviews, including Product Star Ratings help customers to learn more about the product and decide whether it is the right product for them.
To calculate the overall star rating and percentage breakdown by star, we don’t use a simple average. Instead, our system considers things like how recent a review is and if the reviewer bought the item on Amazon. It also analyzed reviews to verify trustworthiness.
Learn more how customers reviews work on AmazonReviewed in the United States on July 22, 2015
Top reviews from the United States
There was a problem filtering reviews right now. Please try again later.
The authors know Django really well and explain concepts in a clear and concise fashion. Both authors being ice-cream lovers decided to do illustrations in terms of ice cream analogies... it sounds crazy for a programming book, but it actually worked pretty well. Additionally, the writing style was lighthearted which prevents the book from being too dry.
As for technical details the book is really solid. The beginning chapters are on proper Django setup and topics such as when to use Class Based Views or Function Based Views. I liked the authors state their own opinion and also present opposing views from other Django contributors. Later chapters cover things like deployment, security, and continuous integration.
I also learned quite a lot about other technologies in the book which they mention. For example, in the deployment chapters they present the trade-offs of Docker, SaltStack, Ansible, Puppet, and Chef. These high level comparisons gave me a better picture of how a real world Django project works.
Here is a concrete example of what I am talking about. In a total of 7 pages, chapter two covers: SQL database options, pip, virtualenv, vagrant / VM, and version control options. I have made passing use of all of these, but found myself none the wiser after reading the chapter. If you are looking to _learn_ about these kind of things, rather than simply being introduced to the authors' well-informed preferences, this is not the book for you.
I read up to chapter 7 before throwing in the towel. My general opinion is that you have to already know quite a lot about what the authors are talking about before you will get much out of what they say.
Two other shortcomings (but not deal breakers) are (a) the book has so many links to other material that reading it as a hard-copy is a real drag -- it would be much better as an online resource with hyperlinks; and (b) the figures are sometimes cute but rarely helpful or insightful or useful.
That said, the book is well written, the authors certainly know a lot, and it seems like it would be a good reference for an experienced web programmer looking to improve their Django game.
For those curious, a very similar book is available titled "Django Design Patterns and Best Practices" published by Packt Publishing. If you prefer text more devoted to framework design choices - or if you're just not a fan of ice cream analogies - Django Design Patterns and Best Practices is also an excellent resource. Otherwise, this edition of Two Scoops of Django is highly comprehensive. In many cases, the Greenfeld's will first display "bad" code and then explain, with "good" code, the reasons for the corrections. Each chapter stands on its own, and is not meant to be a tutorial for Django. If anything, consider this "Effective Django". I highly recommend this book for intermediate Django developers!
Top reviews from other countries
It deals with a wealth of subjects in a clear, concise and readily understandable fashion. A must read for anyone wanting to produce a real-world Django application.








