Hi,

On 07.12.2008, at 16:56, Pablo Ruiz Múzquiz wrote:

> Hi all,
>
> I'm afraid I googled and googled with no success. Django official docs
> or my django book weren't of any help either.
>
> I've got a "legacy" django project which was developed using 0.97svn a
> year ago and a brand new SVN one, sharing the same server.
>
> Django 097 lives at /srv/whatever/django097/django while Django SVN at
> the usual site-packages location.
>
> No matter what I do with Apache's PythonPath, the virtualhost  
> referring
> to the old project will load  the SVN version and, thus, /admin and  
> some
> template handling will fail to load.
>
> Any clues? Thanks in advance,
>
I'm doing that on one of my domains with mod_python and it's working  
just fine.
Here is my relevant apache config.

<VirtualHost *:80>
         ServerName vhost1
     <LocationMatch /(?!favicon\.ico)>
         SetHandler python-program
         PythonHandler django.core.handlers.modpython
         SetEnv DJANGO_SETTINGS_MODULE project.settings
         PythonPath "['<PATH TO DJANGO>', \
                      '<PATH TO DJANGO PROJECT PARENT DIR>', \
                      '<PATH TO DJANGO PROJECT>'] + sys.path"
     </LocationMatch>
</VirtualHost>

in this VirtualHost <PATH TO DJANGO> points to a pre newforms admin  
version of django and then a duplicate of this VirtualHost where the  
<PATH TO DJANGO> points to a trunk version of django.
The _really_ important part is that sys.path comes after the version  
you want to use for this host.
Since sys.path will include your site.packages it'll find the trunk  
version first.

adi

--
Adi J. Sieker         mobile: +49 - 178 - 88 5 88 13
Freelance developer   skype:  adijsieker
SAP-Consultant        web:    http://www.sieker.info/profile
                       openbc: https://www.openbc.com/hp/ 
AdiJoerg_Sieker/

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to