Re: how to import a library in only in django project

2009-11-25 Thread Tim Sawyer
Hi Amit,

It depends how you're running.

If you're using ./manage.py testserver, then change manage.py to add in 
your new path.

If you're using mod-wsgi, then change the site-wsgi.py file:

import os, sys
sys.path.append('/home/path/to/add')
os.environ['DJANGO_SETTINGS_MODULE'] = 'MySite.settings'

import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()

Hope that helps,

Tim.

Amit Sethi wrote:
> 
> Hi ,
> I want to use a library in a django project but I don't want to put it 
> in python path. Where am I supposed to put the sys.append so that it 
> will available to the whole django project.
> -- 
> A-M-I-T S|S
> 
> --
> 
> 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.

--

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.




how to import a library in only in django project

2009-11-25 Thread Amit Sethi
Hi ,
I want to use a library in a django project but I don't want to put it in
python path. Where am I supposed to put the sys.append so that it will
available to the whole django project.
-- 
A-M-I-T S|S

--

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.