Hi all, Yes, I realize that maybe this should go to the mod_python list instead, but I wanted to rule Django out first. Here's my configuration, with Apache2 on Linux (sorry I couldn't make this shorter):
I've got four Django sites I host under different domain names, which are actually all identical except for the HTML. (It's a simple form submission page.) So I'm using a single Django application to serve them all. Since they're SSL, I need a different VirtualHost entry for each. In addition, I have a fifth instance running under another VirtualHost entry as a test site. Again, it is aimed at the same <projectname>.settings file, just like the others. To set the test site apart from the others, I use Apache's SetEnv directive to set 'DJANGO_TEST_MODE' to 1, and then in settings.py, I check for the existence of 'DJANGO_TEST_MODE' in os.environ. In that case, settings.py sets the database name to "databasename_test". (This database is identical to the production database.) The problem is that when people submit that form from the deployment sites, that data intermittently (maybe 5-10% of the time) ends up in the test database. I've verified in the logs that their URLs are correct deployment URLs, so it's not that. To fix the problem, I had to set 'DJANGO_TEST_MODE' to 0 in the deployment VirtualHost entries, and modify settings.py to check its value explicitly. Is this something that happens when using the same settings file, or something? Anyone else seen this? Thanks, Steve --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---

