tags:

views:

20

answers:

2

Dear Djangonauts,

I'm still busy with my Django learning adventure. In another post I asked about how to structure a Django project and applications using buildout. In the details of doing this arose another issue, simply installing 3rd party Django applications using either easy_install or setup.py. My question is, where should you install a Django application? If looking at Django documentation, one would think to put a Django application inside the project folder. But if your Django application is an egg (a mystifying term in my opinion) and you use easy_install without option '-b' (build-directory) the application will be installed into your current python site-packages directory. Using option '-b' will put a copy of the application in your directory, but still will install it in your current site-packages directory. Then there are other options like --install-dir and prefix. Also how should installation happen when using setup.py which have similar options as buid-directory, install-dir, and prefix?

Is there a 'good practice' standard for installing 3rd party Django applications into a Django project?

Thank a lot,

Todd

A: 

They usually aren't installed directly into the project. They're either installed into the system's site-packages/ directory, or in the virtualenv's site-packages/ directory, or in some other well-defined place that the sysadmin has set for this purpose.

Ignacio Vazquez-Abrams
Alright thanks,So that's okay, to have django applications floating around in the site-packages directory. I thought a Django project should have all it's project/application code available in the same location.Cheers,T
Todd Matsumoto
A: 

This is where virtualenv comes into its own. It basically enables a project-specific site_packages directory, where you can install all the third-party applications that relate to your project. I'd definitely recommend it.

Daniel Roseman
Thank Daniel,Yes I'm using virtualenv or virtualenvwrapper actually. So far the best practice is to go ahead and easy_install into the site-packages directory of an enclosed python.
Todd Matsumoto