Arrgh, pressed send to quick. Read:
http://code.google.com/p/modwsgi/wiki/ApplicationIssues#Application_Environment_Variables You are experiencing environment variable leakage between Python sub interpreters. Affects mod_wsgi as well as mod_python, or any embedded solution using multiple Python interpreters for that matter. Make sure you set PRODUCTION/INTERNET in all application configurations. Ie., add: SetEnv PRODUCTION true SetEnv INTERNET true or whatever it needs to be in other configurations. Graham On Nov 3, 4:28 pm, Graham Dumpleton <graham.dumple...@gmail.com> wrote: > Sorry, I should just follow your pastebin links shouldn't I. :-) > > On Nov 3, 4:21 pm, Graham Dumpleton <graham.dumple...@gmail.com> > wrote: > > > > > Which of the many ways of hosting under Apache are you using? > > > mod_python? mod_wsgi? mod_fcgid? mod_fastcgi? mod_cgi(d)? mod_scgi? > > other? > > > SetEnv does not set os.environ in a number of these. > > > Graham > > > On Nov 3, 4:14 pm, delfick755 <delfick...@gmail.com> wrote: > > > > Hello, > > > > I have a setup where a django's debug setting is changed depending on > > > whether os.environ['PRODUCTION'] is true or false. > > > > Which means when I setup apache, I do "SetEnv PRODUCTION true" to mark > > > a site as production. > > > > I then have /etc/hosts setup so thathttp://homeandhttp://cecpoint > > > to localhost. > > > > Then in apache I have dev versions of my two sites (home and cec) as > > > followshttp://pastebin.com/m56aab2f1andhttp://pastebin.com/m537594e6 > > > > This works fine. However I also want it so when people access my > > > computer from outside (i.e.http://delfick.servehttp.com) then debug > > > isn't turned on. For this I havehttp://pastebin.com/m28abffd5 > > > > This also works fine. > > > > However it seems this solution isn't a very good one and it will > > > alternate between versions. so if I refreshhttp://cecthensometimes > > > it's the production version, sometimes development version and same > > > forhttp://delfick.servehttp.com. > > > > is there a way to get around this or will I just have to create copies > > > of the sites to be used for the production version? > > > > Thankyou > > > > Regards > > > Stephen --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---