mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Fixed #13820 -- Started the deprecation process for mod_python. Thanks to Robert Coup for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13648 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -20,14 +20,14 @@ serve pages to a Web server. The Web server delegates the incoming Web requests
|
||||
(via a socket) to FastCGI, which executes the code and passes the response back
|
||||
to the Web server, which, in turn, passes it back to the client's Web browser.
|
||||
|
||||
Like mod_python, FastCGI allows code to stay in memory, allowing requests to be
|
||||
served with no startup time. Unlike mod_python_ (or `mod_perl`_), a FastCGI
|
||||
process doesn't run inside the Web server process, but in a separate,
|
||||
Like mod_wsgi, FastCGI allows code to stay in memory, allowing requests to be
|
||||
served with no startup time. While mod_wsgi can either be configured embedded
|
||||
in the Apache webserver process or as a separate daemon process, a FastCGI
|
||||
process never runs inside the Web server process, always in a separate,
|
||||
persistent process.
|
||||
|
||||
.. _mod_wsgi: http://code.google.com/p/modwsgi/
|
||||
.. _mod_perl: http://perl.apache.org/
|
||||
.. _mod_python: http://www.modpython.org/
|
||||
|
||||
.. admonition:: Why run code in a separate process?
|
||||
|
||||
@@ -35,8 +35,7 @@ persistent process.
|
||||
languages (most notably PHP, Python and Perl) inside the process space of
|
||||
your Web server. Although this lowers startup time -- because code doesn't
|
||||
have to be read off disk for every request -- it comes at the cost of
|
||||
memory use. For mod_python, for example, every Apache process gets its own
|
||||
Python interpreter, which uses up a considerable amount of RAM.
|
||||
memory use.
|
||||
|
||||
Due to the nature of FastCGI, it's even possible to have processes that run
|
||||
under a different user account than the Web server process. That's a nice
|
||||
@@ -361,7 +360,7 @@ Serving admin media files
|
||||
|
||||
Regardless of the server and configuration you eventually decide to use, you
|
||||
will also need to give some thought to how to serve the admin media files. The
|
||||
advice given in the :ref:`modpython <serving-the-admin-files>` documentation
|
||||
advice given in the :ref:`mod_wsgi <serving-the-admin-files>` documentation
|
||||
is also applicable in the setups detailed above.
|
||||
|
||||
Forcing the URL prefix to a particular value
|
||||
|
||||
@@ -10,8 +10,8 @@ ways to easily deploy Django:
|
||||
:maxdepth: 1
|
||||
|
||||
modwsgi
|
||||
modpython
|
||||
fastcgi
|
||||
mod_python (deprecated) <modpython>
|
||||
|
||||
If you're new to deploying Django and/or Python, we'd recommend you try
|
||||
:doc:`mod_wsgi </howto/deployment/modwsgi>` first. In most cases it'll be the easiest,
|
||||
|
||||
@@ -2,6 +2,13 @@
|
||||
How to use Django with Apache and mod_python
|
||||
============================================
|
||||
|
||||
.. warning::
|
||||
|
||||
Support for mod_python will be deprecated in a future release of Django. If
|
||||
you are configuring a new deployment, you are strongly encouraged to
|
||||
consider using :doc:`mod_wsgi </howto/deployment/modwsgi>` or any of the
|
||||
other :doc:`supported backends </howto/deployment/index>`.
|
||||
|
||||
.. highlight:: apache
|
||||
|
||||
The `mod_python`_ module for Apache_ can be used to deploy Django to a
|
||||
@@ -214,8 +221,6 @@ Or add the debugging information to the template of your page.
|
||||
|
||||
.. _mod_python documentation: http://modpython.org/live/current/doc-html/directives.html
|
||||
|
||||
.. _serving-media-files:
|
||||
|
||||
Serving media files
|
||||
===================
|
||||
|
||||
@@ -267,10 +272,6 @@ the ``media`` subdirectory and any URL that ends with ``.jpg``, ``.gif`` or
|
||||
.. _Apache: http://httpd.apache.org/
|
||||
.. _Cherokee: http://www.cherokee-project.com/
|
||||
|
||||
.. _howto-deployment-modpython-serving-the-admin-files:
|
||||
|
||||
.. _serving-the-admin-files:
|
||||
|
||||
Serving the admin files
|
||||
=======================
|
||||
|
||||
|
||||
@@ -53,6 +53,8 @@ just above the final ``import`` line to place your project on the path. Remember
|
||||
replace 'mysite.settings' with your correct settings file, and '/usr/local/django'
|
||||
with your own project's location.
|
||||
|
||||
.. _serving-media-files:
|
||||
|
||||
Serving media files
|
||||
===================
|
||||
|
||||
@@ -106,6 +108,29 @@ in the mod_wsgi documentation on `hosting static files`_.
|
||||
|
||||
.. _hosting static files: http://code.google.com/p/modwsgi/wiki/ConfigurationGuidelines#Hosting_Of_Static_Files
|
||||
|
||||
.. _serving-the-admin-files:
|
||||
|
||||
Serving the admin files
|
||||
=======================
|
||||
|
||||
Note that the Django development server automagically serves admin media files,
|
||||
but this is not the case when you use any other server arrangement. You're
|
||||
responsible for setting up Apache, or whichever media server you're using, to
|
||||
serve the admin files.
|
||||
|
||||
The admin files live in (:file:`django/contrib/admin/media`) of the Django
|
||||
distribution.
|
||||
|
||||
Here are two recommended approaches:
|
||||
|
||||
1. Create a symbolic link to the admin media files from within your
|
||||
document root. This way, all of your Django-related files -- code **and**
|
||||
templates -- stay in one place, and you'll still be able to ``svn
|
||||
update`` your code to get the latest admin templates, if they change.
|
||||
|
||||
2. Or, copy the admin media files so that they live within your Apache
|
||||
document root.
|
||||
|
||||
Details
|
||||
=======
|
||||
|
||||
|
||||
Reference in New Issue
Block a user