Hancock, David (DHANCOCK) wrote: > We have two Django "projects" with distinct settings files, and we need to > be able to make API calls to each of them from the same (separate) > long-running application. Using the API of one of them is easy--we've got > the DJANGO_SETTINGS_MODULE defined in the environment of the calling > process, and it works great. Now we're adding the second project's API > calls, and we're getting the settings of the first project. > > Has anyone got an idea for how to have two sets of settings active in the > same application at the same time? The one proposed solution (put the second > project inside the first one) seems a little too brute-force to me. > > Cheers!
I did exactly this by having two settings files and changing the environment section in the apache container that we used to start off each application. <Location "/app/"> PythonPath "['/usr/tmp/djcodeCODE']+sys.path" SetHandler python-program SetEnv DJANGO_SETTINGS_MODULE djcode.app.settings PythonHandler django.core.handlers.modpython #PythonDebug On PythonInterpreter app </Location> <Location "/test_app/"> PythonPath "['/usr/tmp/djcodeCODE']+sys.path" SetHandler python-program SetEnv DJANGO_SETTINGS_MODULE djcode.app.test_settings PythonHandler django.core.handlers.modpython #PythonDebug On PythonInterpreter test_app </Location> -- Robin Becker --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---