Re: add project directory path to python path permanently

2011-12-01 Thread DrBloodmoney
On Thu, Dec 1, 2011 at 5:59 AM, Nikhil Verma  wrote:
>
> Hi all,
>
> I want to add my django project directory path to PYTHONPATH. I am a newbie
> in ubuntu 11.10
> Please tell me step by step. When i do
import sys
sys.path.append(''project_directory path")
> It does append but not permanently. I want it like whenever i do sys.path it
> should show me Project Directory path in PYTHONPATH

The easiest way is to find out where your site-packages is on your
python installation. Then just symlink your django project directory
there.

Or just use a separate virtualenv for every django project (hint: this
is what you should be doing anyways). Then just symlink into your
virtualenv site-packages

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@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.



Re: add project directory path to python path permanently

2011-12-01 Thread Nan

Do you have pip installed?  If so, you can just create a setup.py
script [1] and from inside your project directory run:

pip install -e ./

I assume setuptools (easy_install) can do the same, but I'm not 100%
clear on the command.

[1] http://docs.python.org/distutils/setupscript.html


On Dec 1, 5:59 am, Nikhil Verma  wrote:
> Hi all,
>
> I want to add my django project directory path to PYTHONPATH. I am a newbie
> in ubuntu 11.10
> Please tell me step by step. When i do>>>import sys
> >>>sys.path.append(''project_directory path")
>
> It does append but not permanently. I want it like whenever i do sys.path
> it should show me Project Directory path in PYTHONPATH
> --
> Regards
> Nikhil Verma
> +91-958-273-3156

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@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.



Re: add project directory path to python path permanently

2011-12-01 Thread Daniel Roseman
On Thursday, 1 December 2011 10:59:15 UTC, Nikhil Verma wrote:
>
>
> Hi all,
>
> I want to add my django project directory path to PYTHONPATH. I am a 
> newbie in ubuntu 11.10
> Please tell me step by step. When i do 
> >>>import sys
> >>>sys.path.append(''project_directory path")
> It does append but not permanently. I want it like whenever i do sys.path 
> it should show me Project Directory path in PYTHONPATH
> -- 
> Regards
> Nikhil Verma
> +91-958-273-3156
>
>
Why? If you start your shell with `./manage.py shell` you will always have 
this.
--
DR. 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/A7eRoKBzDpAJ.
To post to this group, send email to django-users@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.