How can I change PATH used in Python (Django) deployed as Apache 2 mod_wsgi?

Currently Django displays that I have following PATH:

PATH = '/usr/local/bin:/usr/bin:/bin'

I have tried to change path in /etc/environment and /bash.bashrc, but without success.

link|improve this question
Why exactly do you need to do this? Is it not possible for you to use the absolute path to the executable? – Andrew M. Jun 13 '11 at 0:52
I also would ask why. It is recommended practice for web applications not to rely on what the current working directory, nor rely on executables being found in PATH. Use absolute paths in both cases. This is because there are no guarantee what either will be in different hosting mechanisms. – Graham Dumpleton Jun 13 '11 at 3:50
@Redmumba, @Graham Dumpleton, relying on absolute path is worse then relying on PATH. Check every django asset managers (django-compressor, django-mediagenerator etc) for example. – Vladimir Jun 13 '11 at 15:17
feedback

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown

Browse other questions tagged or ask your own question.