From f07e5d4f5df5ca9ca3366d7ecc4b01c490c13198 Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Wed, 19 Oct 2005 01:09:05 +0000 Subject: Fixed #627 -- BACKWARDS-INCOMPATIBLE CHANGE. Admin is now an app, not a middleware. See BackwardsIncompatibleChanges for a full list of changes and information on how to update your code. git-svn-id: http://code.djangoproject.com/svn/django/trunk@948 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- docs/modpython.txt | 32 ++++++++++---------------------- 1 file changed, 10 insertions(+), 22 deletions(-) (limited to 'docs/modpython.txt') diff --git a/docs/modpython.txt b/docs/modpython.txt index d24ea29018..13377ad2dd 100644 --- a/docs/modpython.txt +++ b/docs/modpython.txt @@ -25,12 +25,11 @@ Then edit your ``httpd.conf`` file and add the following:: SetHandler python-program PythonHandler django.core.handlers.modpython - SetEnv DJANGO_SETTINGS_MODULE myproject.settings.main + SetEnv DJANGO_SETTINGS_MODULE myproject.settings PythonDebug On -...and replace ``myproject.settings.main`` with the Python path to your -settings file. +...and replace ``myproject.settings`` with the Python path to your settings file. This tells Apache: "Use mod_python for any URL at or under '/mysite/', using the Django mod_python handler." It passes the value of ``DJANGO_SETTINGS_MODULE`` @@ -55,17 +54,6 @@ full URL. When deploying Django sites on mod_python, you'll need to restart Apache each time you make changes to your Python code. -Here's a template for an admin configuration:: - - - SetHandler python-program - PythonHandler django.core.handlers.modpython - SetEnv DJANGO_SETTINGS_MODULE myproject.settings.admin - PythonDebug On - - -The only thing different here is the ``DJANGO_SETTINGS_MODULE``. - Multiple Django installations on the same Apache ================================================ @@ -77,13 +65,13 @@ instance. Just use ``VirtualHost`` for that, like so:: ServerName www.example.com # ... - SetEnv DJANGO_SETTINGS_MODULE myproject.settings.main + SetEnv DJANGO_SETTINGS_MODULE myproject.settings - ServerName admin.example.com + ServerName www2.example.com # ... - SetEnv DJANGO_SETTINGS_MODULE myproject.settings.admin + SetEnv DJANGO_SETTINGS_MODULE myproject.other_settings If you need to put two Django installations within the same ``VirtualHost``, @@ -95,13 +83,13 @@ mess things up. Use the ``PythonInterpreter`` directive to give different ServerName www.example.com # ... - SetEnv DJANGO_SETTINGS_MODULE myproject.settings.main - PythonInterpreter myproject_main + SetEnv DJANGO_SETTINGS_MODULE myproject.settings + PythonInterpreter myproject - - SetEnv DJANGO_SETTINGS_MODULE myproject.settings.admin - PythonInterpreter myproject_admin + + SetEnv DJANGO_SETTINGS_MODULE myproject.other_settings + PythonInterpreter myproject_other -- cgit v1.3