From 54c3367a6301f7f7978727aee92edbdc98b80dee Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Mon, 7 Nov 2005 14:39:13 +0000 Subject: Updated install.txt and modpython.txt to note required Apache and mod_python versions. Also gave full example for Apache config git-svn-id: http://code.djangoproject.com/svn/django/trunk@1123 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- docs/modpython.txt | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'docs/modpython.txt') diff --git a/docs/modpython.txt b/docs/modpython.txt index 13377ad2dd..b89eda9184 100644 --- a/docs/modpython.txt +++ b/docs/modpython.txt @@ -10,6 +10,8 @@ Python code into memory when the server starts. Code stays in memory throughout the life of an Apache process, which leads to significant performance gains over other server arrangements. +Django requires Apache 2.x and mod_python 3.x. + .. _Apache: http://httpd.apache.org/ .. _mod_python: http://www.modpython.org/ .. _mod_perl: http://perl.apache.org/ @@ -129,7 +131,26 @@ particular part of the site:: SetHandler None -Just change ``Location`` to the root URL of your media files. +Just change ``Location`` to the root URL of your media files. You can also use +```` to match a regular expression. + +This example sets up Django at the site root but explicitly disables Django for +the ``media`` subdirectory and any URL that ends with ``.jpg``, ``.gif`` or +``.png``:: + + + SetHandler python-program + PythonHandler django.core.handlers.modpython + SetEnv DJANGO_SETTINGS_MODULE myproject.settings + + + + SetHandler None + + + + SetHandler None + Note that the Django development server automagically serves admin media files, but this is not the case when you use any other server arrangement. -- cgit v1.3