On Tue, May 18, 2010 at 5:02 PM, Bill Freeman <ke1g...@gmail.com> wrote:
> I'll be that you can have a private site-packages directory, or whatever
> you want to call it, which you can add to sys.path.  You can manipulate
> sys.path in your manage.py, but if you don't need to override basic
> django stuff that is imported before settings.py is read, you could do
> the manipulation in settings.py.  You will want to insert it at/near the
> beginning of sys.path, so that if the system and you have versions
> of the same file, you will get yours.
>
> (I'm not sure what you need to do for mod_wsgi if you make the
> changes in manage.py.)
>
> Making easy_install or pip install to a private site-packages directory
> is possible, but I'll have to refer you to the documentation for that.
>

Well, you could mess around with that stuff manually yourself, or you
can use virtualenv, like the rest of the python world.

It's as easy as:

cd folder_above_my_project
virtualenv environ
. ./activate
pip install some_pkg # or easy_install (but pip is _much_ better)
python project/manage.py <do_stuff>

No messing with sys.path, no messing with launch scripts. To use it
with mod_wsgi, at its simplest you can set:
WSGIPythonHome /path/to/folder_above_my_project/environ

Theres much more you can do with mod_wsgi/virtualenv - more details:
http://code.google.com/p/modwsgi/wiki/VirtualEnvironments

Cheers

Tom

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to