11👍
✅
I’ve manage to solve my problem by using this solution:
http://drumcoder.co.uk/blog/2010/nov/12/apache-environment-variables-and-mod_wsgi/
1👍
I’ve just recently found the cause of this myself.
When running under apache/mod_wsgi, your application runs under a different user, so those environment variables are not set. Your options are:
- Use apache SetEnv directive in your virtualhost config,
- Set the environment variables for the user that apache runs your code as, or
- Tell apache to run the wsgidaemon process as your user.
- Django template tag: How to send next_page in {url auth_logout}?
- Django @override_settings does not allow dictionary?
- Include template tag not working in django
Source:stackexchange.com