Dan
This works for me -- using mod_python.
VirtualHost defininition:
> SetEnv VIRTUAL_HOST_NAME dev.hostname.com
> SetEnv DATABASE_NAME dbname
settings.py:
> VIRTUAL_HOST_NAME = os.environ.get('VIRTUAL_HOST_NAME')
> DATABASE_NAME = os.environ.get('DATABASE_NAME')
Liam
> --
>
> You received this message because you are subscribed to the Google Groups "Django users" group.
> To post to this group, send email to django...@googlegroups.com.
> To unsubscribe from this group, send email to django-users...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
>
>
>
>
On Dec 18, 3:57 pm, Info Cascade <informationcasc...@gmail.com> wrote:
> Dan,
>
> This works for me -- using mod_python.
>
> VirtualHost defininition:> SetEnv VIRTUAL_HOST_NAME dev.hostname.com
> > SetEnv DATABASE_NAME dbname
> settings.py:
> > VIRTUAL_HOST_NAME = os.environ.get('VIRTUAL_HOST_NAME')
> > DATABASE_NAME = os.environ.get('DATABASE_NAME')
That is mod_python. You cannot do that with mod_wsgi and for the good
reason that what the Django mod_python adapter did in that respect was
flawed because of the problems it can cause. You are ill advised to
rely on that behaviour in the Django mod_python adapter as it isn't
portable and may well bite you one day. I'd very much suggest you not
recommend it to people unless you understand the problems it can cause
and can explain properly to others what those problems are.
Graham