Django

Code

Changeset 277

Show
Ignore:
Timestamp:
07/21/05 12:37:36 (3 years ago)
Author:
jacob
Message:

Added note about using different settings modules in the same virtual host
(thanks steadicat).

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/docs/modpython.txt

    r275 r277  
    8484    </VirtualHost> 
    8585 
    86 Don't put two Django installations within the same ``VirtualHost``. Due to the 
    87 way mod_python caches code in memory, your two Django installations will 
    88 conflict. If you can think of a way to solve this problem, please file a ticket 
    89 in our ticket system. 
     86If you need to put two Django installations within the same ``VirtualHost``, 
     87you'll see problems due to the way mod_python caches code in memory.  To fix 
     88this problem, you'll need to use the ``PythonInterpreter`` directive to give 
     89different ``<Location>``s seperate interpreters:: 
     90 
     91    <VirtualHost *> 
     92        ServerName www.example.com 
     93        # ... 
     94        <Location "/something"> 
     95            SetEnv DJANGO_SETTINGS_MODULE myproject.settings.main 
     96            PythonInterpreter myproject_main 
     97        </Location> 
     98         
     99        <Location "/admin"> 
     100            SetEnv DJANGO_SETTINGS_MODULE myproject.settings.admin 
     101            PythonInterpreter myproject_admin 
     102        </Location> 
     103    </VirtualHost> 
     104 
    90105 
    91106Running a development server with mod_python