Two Scoops of Django: Best Practices For Django 1.5 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. We have put thousands of hours into writing and revising its hundreds of pages of concise, example-packed text.
Django 1.5 is a high-level Python web framework that encourages the rapid development of maintainable applications. Daniel Greenfeld and Audrey Roy show you how they use this framework to create award-winning web sites.
What You'll Learn:
How to build scalable, secure, maintainable Django applications using techniques otherwise found across a hundred websites.
See how to use Django's models, views, forms, and templates.
Handling RESTful APIs.
Use Django's amazing ecosphere of third-party packages.
How to contribute back to the Django community.
Whom This Book Is For:
Developers with beginning to intermediate knowledge of Django who want to improve their Django projects.
"Ha ha, I learned something in the first chapter. Awesome."--Zed Shaw, Author of Learn Python the Hard Way.
"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, Red Hat engineer and PyLadies ambassador.
"Two Scoops should provide some food for thought and usable recommendations for anybody using Django regularly."--Malcolm Tredinnick, Django Core Contributor
"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
"This book should prove to be an amazing resource for any new-to-Django developer that picks it up."--Kenneth Love, Creator of "Getting Started with Django"
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: Database/Model Best Practices
Chapter 7: Function-and Class-Based Views
Chapter 8: Best Practices for Class Based Views
Chapter 9: Common Patterns for Forms
Chapter 10: More Things To Know About Forms
Chapter 11: Building REST APIs in Django
Chapter 12: Templates: Best Practices
Chapter 13: Template Tags and Filters
Chapter 14: Tradeoffs of Replacing Core Components
Chapter 15: Working With the Django Admin
Chapter 16: Dealing with the User Model
Chapter 17: Django's Secret Sauce: Third-Party Packages
Chapter 18: Testing Chapter of Doom!
Chapter 19: Documentation: Be Obsessed
Chapter 20: Finding and Reducing Bottlenecks
Chapter 21: Security Best Practices
Chapter 22: Logging: Tips and Tools
Chapter 23: Signals: Use Cases and Avoidance Techniques
Chapter 24: What About Those Random Utilities?
Chapter 25: Deploying Django Projects
Chapter 26: How To Release Your Own Django Packages
Chapter 27: Closing Thoughts
Appendix A: Packages Mentioned In This Book
Appendix B: Troubleshooting
Appendix C: Additional Resources
Über den Autor und weitere Mitwirkende
Daniel Greenfeld and Audrey Roy are best known for their open-source community leadership work on the following initiatives:
- DjangoPackages.com and the OpenComparison framework. We ran the largest sprint at PyCon 2011.
- PyLadies, a women's outreach/mentorship group. Nurturing the group was basically a 2nd fulltime job for us in 2011.
- 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.