views:

19

answers:

2

My setup is Django 1.2 running via mod_wsgi under Debian Lenny.

I have a such structure:

/root/
    project1/appx
                 models.py
    project2/appy
                 models.py
                 management/
                           commands/
                                   mycommand.py

Now I want to import Foox model from project1 to project2.

What would be the easiest solution WITHOUT moving the whole project dir to Python_path ? I especially need a solution without using mod_wsgi because I will be importing this model from project1 to custom manage.py command called "mycommand" in project2 ?

A: 

How about:

$ cd /root/project2
$ ln -s ../project1/appx

?

Seth
+2  A: 
import sys
sys.path.append('/root/project1')
from appx.models import Foox
Daniel Roseman
works great! thanks Daniel!
Hellnar