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.
Praise:
"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
* 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.
I am honestly torn about this book. I want to give it a good review, because I learned a few useful things from it and because of that the book proved to be a good investment. I am certainly a better Django developer having read it. But at the same time it contains chapters like the one about logging, which can be summed up as saying "Hey, logging is good. You should log more. Go, read the official Django docs if you want to know how." Not very helpful. Fortunately other parts of the book are a little more eloquent, but I still couldn't shake the feeling that it was all written during a few coffee breaks.
Maybe I am too harsh. As I noted, I was able to learn from it and what I did learn is useful in my day to day work and for that alone I am glad I did decide to make the purchase. On the other hand this book has plenty of untapped potential that could turn it into THE book on Django best practices should the authors decide not to just skim the surface.
IMHO, "Two Scoops of Django" is the best piece of Django documentation out there. It covers lots of things that are not covered by the existing documentation. Both the authors are very experienced Python/Django developers and they give tons of precious tips. I think this is the perfect book for everyone who knows the basics of Django and want to know how to use it more effectively. I've learned a lot from it and I'm already applying many tips to my projects.
Thanks and congratulations to the authors of this awesome book!
Great book for developing sites with Django. It goes beyond the default django tutorial and offers some examples on how to do things (i.e. defining custom model forms) with best practices.
Over the past four years, I've worked with Django in a variety of contexts, from consulting to startups to research. It's my web framework of choice and I felt pretty effective & competent using it.
The highest praise that I can offer this book is that it made me feel like a complete amateur. Greenfield and Roy put together a concise and actionable collection of tips and tricks to help us all become better Djangonauts. The writing was clear and straightforward, with plenty of excellent code examples.
Some books entertain, others inform. This one will be one that makes me a much more effective developer and for that, I thank the authors.
(Now it's time to start refactoring some projects...)
A brief book explaining various stuff on Django. IMHO, the book should be read directly after one learns "What is what?" in Djanga: --> finishing the Django tutorial, doing a sample app that consists of various models, views, templates, forms, using signals, implementing logging etc. etc. After that, one can be enlightened as there are various nicer ways of doing this and that.
For me, most of the stuff I read in the book has been the practices that I apply in my professional life, so It has been some kind of approval from Django professionals. And It has contributed me much in some corner-case examples.
Btw, This is the first book I've read in my Kindle Paperwhite 2, so its place is somewhere special for me (=
Well written book but perhaps best for intermediate Djangonauts. To the authors' credit they do mention their intended audience at the beginning.
As a beginner good deal of this was above my head and many basic concepts are not explained. It did give me a detailed but fuzzy introduction to Django development. I'd give them five stars if they created simple intro to Django section as this information is desperately needed because the Django tutorial also doesn't do the best job at this.
Ultimately, this book does what it says it will, it is well organized and I have a feeling I'll be referring to this book often in the future.
If you are using Django in production this is must read book.
Q: I am using django since 0.8 do I need this book ?
A: Yes, consider the book as starting point to validate your assumption.
Q: I just started using django, should I read this ?
A: Yes. I started to use django in production last month. Sometimes I felt I should finish this book before pushing any code further. For every two or three chapters I can clearly find mistakes and fix it.
This is not a book for those that have just finished the Django tutorial. Doubtless beginners will get something from this book, but the most benefit will be for those who are earnestly writing Django code and is probably best for those that have been doing so for months if not years. (Pet peeve: should really be called 'good practices' and not 'best practices':-P) So, from the feel of the content it should get 4 stars, as I am not yet in a position to adequately judge it, it gets 3 stars.
It falls away from Django specific stuff at the end, but the first 1/3 of the book is simply invaluable. Many of the things this book drives home for the last half of the book are probably (or I could be wrong) common knowledge for anyone senior enough to understand the first half of the book, but you can't go wrong with picking this book up and reading it if you're working in the field.
Can't say I've finish reading this book. It more like a reference you open anytime you need for some extra help on each topic, with emphasis on best practices. Be aware that this book is not for beginners! But if you want to progress with python + django you're going to appreciate the suggestions found there.
Useful book especially for beginners but I would love to read more about slightly more advanced concepts such as where to place your business logic, working with mangers, etc.
It's also written for 1.6 and with 1.8 bringing some huge changes this book will become less relevant.
4 stars if you're just starting out with Django, it's a good book to read just after the Polls tutorial!
Highly useful for those with beginner/intermediate level knowledge in Django. Many useful best practices that I wouldn't have come across in forums or tutorials. Many of these tips may be available as learning during opensource development but that's to be earned the hard way.
A lot of useful tricks and best practices discussed. Easy language, lots of examples. A little hard to get your head around some of the things if you haven`t had many years of development experience with Django.
Vraiment un bon livre sur Django avec de bons conseils tout autant pour les débutants que des développeurs confirmés. Je trouve magnifique l'exemple d'application du livre car pour une fois c'est drôle et sympathique, donc les exemples et conseils ont plus de chance d'être retenus.
I read this book on a flight back to chicago. It is about django best practices and is very easy to read, and the authors are pretty convincing. There are a few times where I felt the examples were too simple to really be applicable, but overall I felt like I learned a lot from the book.
This explains for a novice or an experienced programmer, how to develop better and cleaner in Django. Some good practices are explained also, and a few extensions that makes your life in Django easier.
I'm an experienced Django developer and liked a lot this book!!
I'm back to Django. After this week trying various Python frameworks to create one project I found that Django framework probably is best for its big community (though a lot of things outdated already - Django 1.5 used in the book). Book has many very useful tips.
Great book for every Django-developers. Bad and Good examples made this book especially cool. I read this book from time to time, and every time I find something new for yourself
This book is great to read if you had touched Django Framework at list for six months. There is a lot of good tips, best practices, suggestions. Best Django book at this moment.
One of the best IT books I've read in a long time: concise, funny and with a clear vision on how to apply the content. Not too many errors in the examples ;-)