After looking at the reusable apps chapter of Practical Django Projects and listening to the DjangoCon (Pycon?) lecture, there seems to be an emphasis on making your apps pluggable by installing them into the Python path, namely site-packages.
What I don’t understand is what happens when the version of one of those installed apps changes. If I update one of the apps that’s installed to site-packages, then won’t that break all my current projects that use it? I never noticed anything in settings.py that let’s you specify the version of the app you’re importing.
I think in Ruby/Rails, they’re able to freeze gems for this sort of situation. But what are we supposed to do in Python/Django?
Having multiple versions of the same package gets messy (setuptools can do it, though).
I’ve found it cleaner to put each project in its own
virtualenv. We usevirtualevwrapperto manage the virtualenvs easily, and the--no-site-packagesoption to make every project really self-contained and portable across machines.This is the recommended setup for mod_wsgi servers.