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.
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
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.