Django Best Practices
This post got a bit long-winded, skip to the project announcment if you prefer.
One of the things I love about Python and Django is the philosophy that there is one obvious way to do things. Standards make it easy to dive into other people’s code and figure out what is going on pretty quickly. As with anything under active development, however, those standards are subject to change over time. What was best practice for building sites with Django 0.91 is significantly different than building sites with Django 1.0. Better tools and more experience allow us to refine our processes over time into a set of best practices. While both Python and Django are very well documented, much of the experience and wisdom that is outside the scope of the official documentation is not.
Blogs are Bad for Documentation
Most of this information lives scattered across blogs, mailing lists, books, and the IRC channel. None of these avenues make it easy for developers to learn how to do things the “one obvious way.” There is a lot of stale information floating around out there, some of which we are guilty of creating. We try to blog about how we write and deploy code at Lincoln Loop, but like everyone else out there, we’re utilizing new tools and techniques on a regular basis. Our posts become outdated, but still get lots of hits from users searching for answers. Blogs and mailing lists are great for getting the word out there, but they aren’t true documentation of our growing ecosystem. What’s really needed is a living document.
Sphinx is Good for Documentation
Thankfully, Eric Holscher and Brian Rosner’s Reusable App Docs project got the ball rolling on creating this documentation. It’s focused on giving Django developers a comprehensive manual for building reusable Django applications. Better yet, it is open source and can be generated into any number of formats using the amazing Sphinx documentation generator.
Scratching the Itch
Our team has grown recently and it was important to us that everyone here develop using the same technique and style. Our intranet pointed to Eric and Brian’s project, but quickly started expanding on it. Without realizing it, we created documentation on Django best practices and realized we shouldn’t keep it hidden. I spoke to Eric about forking the project and expanding upon it since our scope was outside of the original documentation he and Brian created. With his blessing we started django-best-practices at GitHub. We’ve started some brain dumps into the document already and hope to chip away at it over time.
p(#the-goods). You can find a live copy of Django Best Practices at http://lincolnloop.com/django-best-practices/. We’ll still blog about new tips and tricks, but link those posts to the live document so people can always get up-to-date information. If you’re interested in following our progress, you can also follow the project feed.
Comments
Got something to say?
Our Products
Categories
- accessiblity
- code
- company news
- django
- gondola
- open source
- portfolio
- presentation
- pro tip
- review
- screencast
- seo
- software
- subversion
- trailmapping
- wordpress
Archives
- February, 2010
- December, 2009
- November, 2009
- October, 2009
- September, 2009
- June, 2009
- April, 2009
- February, 2009
Elsewhere
What we’ve been up to online
-
pushed to master at lincolnloop/django-redmine
Pete, 1 day, 1 hour ago -
pushed to master at lincolnloop/django-redmine
Pete, 1 day, 1 hour ago -
pushed to master at lincolnloop/django-redmine
Pete, 1 day, 8 hours ago -
pushed to master at lincolnloop/django-redmine
Pete, 1 day, 10 hours ago -
added cmheisel to django-redmine
Pete, 1 day, 10 hours ago -
started following cmheisel
Pete, 1 day, 10 hours ago -
created branch master at lincolnloop/django-redmine
Pete, 1 day, 11 hours ago -
created repository redpiston
Pete, 1 day, 11 hours ago -
Best benefit of a distributed company: "You can hire great people wherever you find them" http://bit.ly/cWint6
Pete, 1 day, 15 hours ago -
5 reasons why your company should be distributed « toni.org
Best benefit of a distributed company: "You can hire great people wherever you find them"
Pete, 1 day, 15 hours ago -
Great article about the new smart if tag on Django Advent by Lincoln Loop's very own Chris Beaven (aka SmileyChris). http://bit.ly/bDUpH9
Pete, 2 weeks, 2 days ago -
pushed to master at lincolnloop/django-startproject
Pete, 3 weeks, 1 day ago -
pushed to master at lincolnloop/django-startproject
Pete, 3 weeks, 1 day ago -
pushed to master at lincolnloop/django-render
Pete, 3 weeks, 1 day ago -
created branch master at lincolnloop/django-render
Pete, 3 weeks, 1 day ago


Great idea!
Adding comments to Best Practices would be great. Or any other feedback mechanism (like one in django book or similar).
Thank you
+1
for Nick.
How do you configure the Apache backend? I’d be very interested to know the bits with virtualenv.
I can’t see any PROJECT/apps directory – the one the Reusable App Docs project uses. Does it mean you actually install all your project applications? By project applications I mean all the applications specific to your project, and by installing I mean installing into the virtualenv.
Thank you
Yes, Django has really great design philosophy that saves a lot of time.
Thanks for the feedback all. Comments are now enabled via Disqus.