[Baypiggies] VirtualEnv and Django question

Glen Jarvis glen at glenjarvis.com
Thu Feb 24 20:04:00 CET 2011


This is the config that works in most other situations for me too. We have a
package (recaptcha client) that is packaged from easy_install (and I think
some non-standard customization from the creators) that can't be found with
this environment. I've struggled with this package before. Virtualenv and
pip install of this package works perfectly from the command line (which is
great I don't have to go in and look at this manually as I've done in my own
creation of virtual environments). However, with settings like you have, it
can't find the package...  This is why I'm considering the activate_this.py
within the module.

Thanks for letting me know that this is how you handle it so I know I'm at
least in the right ballpark of the solution.

Cheers,

Glen

On Thu, Feb 24, 2011 at 10:53 AM, Eric Walstad <ewalstad at gmail.com> wrote:

> On Thu, Feb 24, 2011 at 10:35 AM, Glen Jarvis <glen at glenjarvis.com> wrote:
> >  We'll still have to have a
> > private "local_settings.py" for the developers to play in (as we can't
> have
> > a different settings file for each of them).
> Why not?
>
>
> > I can't "activate" the same environment in the Apache
> > configuration file (or I don't seem to be successful in doing so).
> > ...We also have mod_python
> An apache VH config similar to this works for me:
>
>
>    <Location "/">
>        SetHandler python-program
>        PythonHandler django.core.handlers.modpython
>        SetEnv DJANGO_SETTINGS_MODULE project_name.settings
>        PythonPath
> "sys.path+['/path/to/virtualenvs/venv_name/lib/python2.N/site-packages',
> '/path/to/django_X_Y', '/path/to/django/project']"
>        ...
>    </Location>
>
> hth,
>
> Eric
>



-- 
Things which matter most must never be at the mercy of things which matter
least.

-- Goethe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/baypiggies/attachments/20110224/21ca1c97/attachment.html>


More information about the Baypiggies mailing list