Devigner blog about development and design

Sandboxing Django Reusable Apps

A couple days ago Brian Rosner posted a great article on Reusable App Conventions. If you haven’t read it yet it’s worth a read or two. I have a few in the works and want to quickly discuss sandboxing your development process for reusables using Pinax.


A few weeks ago we released Pinax 0.5.0 and while it’s purpose is much more than sandboxing, the project structure is perfect for it. Pinax comes out of the box with two projects. Basic and complete. The basic project only has a few apps for notifications, account, mailers and so forth. Complete project has everything you need for a complete site.

What I have been doing, and I know Brian, Janis and James have been doing the same, is using the basic project for sandboxing development of other projects.

The Simplicity

Grab a copy of Pinax 0.5.0 and un-tar it.
If you have your reusable app project started, add it to your python path and open settings.py located in pinax-0.5.0/projects/basic_project/ and add your reusable app to the INSTALLED_APPS. Now you can ./manage.py syncb and ./manage.py runserver.

I also add Django debug toolar to all my projects as I’m developing them. It is almost an addictive game of reducing queries when using it.

Now go write and test your app as you develop; make changes to the reusable your building while testing it in Pinax. This should not replace writing tests but is a great way of testing your apps for issues that may arise and to see first-hand how they play with other reusable apps in a stable project.

For some good test-related posts — see Eric Holscher.