Two Scoops Press

Making Python and Django as fun as ice cream

Two Scoops of Django: Best Practices for Django 1.11

Two Scoops Press

$ 42.95 $ 719.25

This book is chock-full of 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. This book is an update and expansion of previous editions:

  • Updated for Django 1.11 (which will be maintained by the core team until at least April 2020!) and changes in the Django ecosystem, with corrections and clarifications added thanks to the feedback of our readers and technical reviewers.
  • Refocused the book on Python 3, with an appendix for working with Python 2.7.
  • Revised material on nearly every topic within the book.
  • 20+ pages of new material on Django REST Framework, security, forms, models, and more.

Two Scoops of Django: Best Practices to Django 1.11 is available right now in PDF format. We are aiming to have the print edition ready for sale in 30-60 days. We are also looking into an ePub/Kindle version but make no promises.

As we're certain you have many questions, we've written up a FAQ.

Reviews of Two Scoops of Django 1.11

None yet, be the first and let us know so we can list you here!

What people said about previous editions:

  • This book should prove to be an amazing resource for any new-to-Django developer that picks it up. ~ Kenneth Love, Python and Django instructor at Treehouse
  • A must for all Django programmers. ~ Derrick Kearney, lead moderator of the largest Python and Django groups on Facebook
  • 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"
  • <3 <3 <3 ~ Jannis Leidel, Django Core Contributor
  • 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, implementer of the 1.8 templates refactor
  • One reason why using Django is better than Rails or some Node framework is because of @pydanny and @audreyr's 2 scoops book! What a reference! ~ Lakshman Prasad, senior Python developer, educator, and speaker

What does the book cover?

Two Scoops of Django covers common best practices, including the following:

Table of Contents

Here is a snapshot of the table of contents from Two Scoops of Django: Best Practices for Django 1.11.

  • 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 with Django REST Framework (NEW)
  • 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: Security Best Practices
  • Chapter 26: Logging: What's It For, Anyway?
  • Chapter 27: Signals: Use Cases and Avoidance Techniques
  • Chapter 28: What About Those Random Utilities?
  • Chapter 29: Deployment: Platforms as a Service
  • Chapter 30: Deploying Django Projects
  • Chapter 31: Continuous Integration
  • Chapter 32: The Art of Debugging
  • Chapter 33: Where and How to Ask Django Questions
  • Chapter 34: Closing Thoughts
  • Appendix A: Packages Mentioned in This Book
  • Appendix B: Troubleshooting Installation
  • Appendix C: Additional Resources
  • Appendix D: Internationalization and Localization
  • Appendix E: Settings Alternatives
  • Appendix F: Advice for Python 2.7 Users (NEW)
  • Appendix G: Security Settings Reference
  • Appendix H: Handling Security Failures (NEW)
  • Acknowledgments
  • Index

Why We Wrote This Book Series

After seeing other fellow developers struggle to get past the same sorts of basic hurdles in Django we had to overcome, we realized that much of the Django knowledge that we take for granted is not written down with examples anywhere.

We decided to take everything we know and write it down. Along the way, we learned even more from others and wrote those things down as well.

Enough Already! Can I Order the Book?

Yes! Go to the top of this page and click the Add to cart button.