#135 closed defect (fixed)
Document mod_python behavior with more than one SETTINGS in a vhost
Reported by: | Manuzhai | Owned by: | Jacob |
---|---|---|---|
Component: | Documentation | Version: | |
Severity: | normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
URL resolving will be unstable if more than one DJANGO_SETTINGS_MODULE is referenced within a vhost (for example, in different locations) due to mod_python caching. This should be documented in the mod_python doc.
Change History (4)
comment:1 by , 19 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 by , 19 years ago
I believe this can be addressed by using mod_python's PythonInterpreter directive. This can force mod_python to use seperate python interpreter instances. For example:
<Location "/"> SetHandler python-program PythonHandler django.core.handlers.modpython SetEnv DJANGO_SETTINGS_MODULE mysite.settings.main ... PythonInterpreter mysite.main </Location> <Location "/admin"> SetHandler python-program PythonHandler django.core.handlers.modpython SetEnv DJANGO_SETTINGS_MODULE mysite.settings.admin ... PythonInterpreter mysite.admin </Location>
This configuration seems to work for me. The PythonInterpreter directive is documented at http://www.dusek.ch/manual/apache/mod_python/dir-other-pi.html.
comment:3 by , 19 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
(In [275]) Fixed #135 -- Added 'Multiple Django installations on the same Apache' to docs/mod_python.txt