Ticket #13820: django-13820.diff
File django-13820.diff, 17.3 KB (added by , 14 years ago) |
---|
-
docs/howto/apache-auth.txt
### Eclipse Workspace Patch 1.0 #P django-trunk
4 4 Authenticating against Django's user database from Apache 5 5 ========================================================= 6 6 7 .. warning:: 8 9 Support for mod_python will be deprecated in a future release of Django. 10 At that time, this method of authentication will no longer be provided by 11 Django. The community is welcome to offer its own alternate solutions 12 using WSGI middleware or other approaches. 13 7 14 Since keeping multiple authentication databases in sync is a common problem when 8 15 dealing with Apache, you can configuring Apache to authenticate against Django's 9 16 :ref:`authentication system <topics-auth>` directly. For example, you -
docs/howto/static-files.txt
33 33 production setting. Use this only for development. 34 34 35 35 For information on serving static files in an Apache production environment, 36 see the :ref:`Django mod_ pythondocumentation <serving-media-files>`.36 see the :ref:`Django mod_wsgi documentation <serving-media-files>`. 37 37 38 38 How to do it 39 39 ============ -
docs/howto/deployment/fastcgi.txt
22 22 (via a socket) to FastCGI, which executes the code and passes the response back 23 23 to the Web server, which, in turn, passes it back to the client's Web browser. 24 24 25 Like mod_python, FastCGI allows code to stay in memory, allowing requests to be 26 served with no startup time. Unlike mod_python_ (or `mod_perl`_), a FastCGI 27 process doesn't run inside the Web server process, but in a separate, 25 Like mod_wsgi, FastCGI allows code to stay in memory, allowing requests to be 26 served with no startup time. While mod_wsgi can either be configured embedded 27 in the Apache webserver process or as a separate daemon process, a FastCGI 28 process never runs inside the Web server process, always in a separate, 28 29 persistent process. 29 30 30 31 .. _mod_wsgi: http://code.google.com/p/modwsgi/ 31 32 .. _mod_perl: http://perl.apache.org/ 32 .. _mod_python: http://www.modpython.org/33 33 34 34 .. admonition:: Why run code in a separate process? 35 35 … … 37 37 languages (most notably PHP, Python and Perl) inside the process space of 38 38 your Web server. Although this lowers startup time -- because code doesn't 39 39 have to be read off disk for every request -- it comes at the cost of 40 memory use. For mod_python, for example, every Apache process gets its own 41 Python interpreter, which uses up a considerable amount of RAM. 40 memory use. 42 41 43 42 Due to the nature of FastCGI, it's even possible to have processes that run 44 43 under a different user account than the Web server process. That's a nice … … 363 362 364 363 Regardless of the server and configuration you eventually decide to use, you 365 364 will also need to give some thought to how to serve the admin media files. The 366 advice given in the :ref:`mod python<serving-the-admin-files>` documentation365 advice given in the :ref:`mod_wsgi <serving-the-admin-files>` documentation 367 366 is also applicable in the setups detailed above. 368 367 369 368 Forcing the URL prefix to a particular value -
docs/ref/signals.txt
376 376 Arguments sent with this signal: 377 377 378 378 ``sender`` 379 The handler class -- i.e. 380 :class:`django.core.handlers.modpython.ModPythonHandler` or 379 The handler class -- e.g. 381 380 :class:`django.core.handlers.wsgi.WsgiHandler` -- that handled 382 381 the request. 383 382 -
docs/topics/settings.txt
66 66 67 67 .. _django-admin.py: ../django-admin/ 68 68 69 On the server (mod_ python)69 On the server (mod_wsgi) 70 70 -------------------------- 71 71 72 In your live server environment, you'll need to tell Apache/mod_python which73 settings file to use. Do that with `` SetEnv``::72 In your live server environment, you'll need to tell your WSGI application what 73 settings file to use. Do that with ``os.environ``:: 74 74 75 <Location "/mysite/"> 76 SetHandler python-program 77 PythonHandler django.core.handlers.modpython 78 SetEnv DJANGO_SETTINGS_MODULE mysite.settings 79 </Location> 75 import os 76 77 os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings' 80 78 81 Read the :ref:`Django mod_ python documentation <howto-deployment-modpython>` for82 more information .79 Read the :ref:`Django mod_wsgi documentation <howto-deployment-modwsgi>` for 80 more information and other common elements to a Django WSGI application. 83 81 84 82 Default settings 85 83 ================ -
docs/howto/deployment/modpython.txt
4 4 How to use Django with Apache and mod_python 5 5 ============================================ 6 6 7 .. warning:: 8 9 Support for mod_python will be deprecated in a future release of Django. If 10 you are configuring a new deployment, you are strongly encouraged to 11 consider using :ref:`mod_wsgi <howto-deployment-modwsgi>` or any of the 12 other :ref:`supported backends <howto-deployment-index>`. 13 7 14 .. highlight:: apache 8 15 9 16 The `mod_python`_ module for Apache_ can be used to deploy Django to a … … 216 223 217 224 .. _mod_python documentation: http://modpython.org/live/current/doc-html/directives.html 218 225 219 .. _serving-media-files:220 221 226 Serving media files 222 227 =================== 223 228 … … 269 274 .. _Apache: http://httpd.apache.org/ 270 275 .. _Cherokee: http://www.cherokee-project.com/ 271 276 272 .. _howto-deployment-modpython-serving-the-admin-files:273 274 .. _serving-the-admin-files:275 276 277 Serving the admin files 277 278 ======================= 278 279 -
docs/howto/deployment/modwsgi.txt
55 55 replace 'mysite.settings' with your correct settings file, and '/usr/local/django' 56 56 with your own project's location. 57 57 58 .. _serving-media-files: 59 58 60 Serving media files 59 61 =================== 60 62 … … 108 110 109 111 .. _hosting static files: http://code.google.com/p/modwsgi/wiki/ConfigurationGuidelines#Hosting_Of_Static_Files 110 112 113 .. _serving-the-admin-files: 114 115 Serving the admin files 116 ======================= 117 118 Note that the Django development server automagically serves admin media files, 119 but this is not the case when you use any other server arrangement. You're 120 responsible for setting up Apache, or whichever media server you're using, to 121 serve the admin files. 122 123 The admin files live in (:file:`django/contrib/admin/media`) of the Django 124 distribution. 125 126 Here are two recommended approaches: 127 128 1. Create a symbolic link to the admin media files from within your 129 document root. This way, all of your Django-related files -- code **and** 130 templates -- stay in one place, and you'll still be able to ``svn 131 update`` your code to get the latest admin templates, if they change. 132 133 2. Or, copy the admin media files so that they live within your Apache 134 document root. 135 111 136 Details 112 137 ======= 113 138 -
django/core/handlers/modpython.py
1 1 import os 2 2 from pprint import pformat 3 from warnings import warn 3 4 4 5 from django import http 5 6 from django.core import signals … … 179 180 request_class = ModPythonRequest 180 181 181 182 def __call__(self, req): 183 warn(('Support for serving Django requests with mod_python will be ' 184 'deprecated in a future release in favor of the mod_wsgi ' 185 'backend.'), 186 PendingDeprecationWarning) 187 182 188 # mod_python fakes the environ, and thus doesn't process SetEnv. This fixes that 183 189 os.environ.update(req.subprocess_env) 184 190 -
docs/ref/contrib/gis/deployment.txt
59 59 ``mod_python`` 60 60 -------------- 61 61 62 .. warning:: 63 Support for mod_python will be deprecated in a future release of Django. If 64 you are configuring a new deployment, you are strongly encouraged to 65 consider using :ref:`mod_wsgi <howto-deployment-modwsgi>` or any of the 66 other :ref:`supported backends <howto-deployment-index>`. 67 62 68 Example:: 63 69 64 70 <VirtualHost *:80> -
docs/releases/1.3.txt
19 19 ===================================== 20 20 21 21 22 .. _deprecated-features-1.3: 22 23 23 24 Features deprecated in 1.3 24 25 ========================== 25 26 27 Django 1.3 deprecates some features from earlier releases. 28 These features are still supported, but will be gradually phased out 29 over the next few release cycles. 26 30 31 Code taking advantage of any of the features below will raise a 32 ``PendingDeprecationWarning`` in Django 1.3. This warning will be 33 silent by default, but may be turned on using Python's `warnings 34 module`_, or by running Python with a ``-Wd`` or `-Wall` flag. 27 35 36 .. _warnings module: http://docs.python.org/library/warnings.html 37 38 In Django 1.4, these warnings will become a ``DeprecationWarning``, 39 which is *not* silent. In Django 1.5 support for these features will 40 be removed entirely. 41 42 .. seealso:: 43 44 For more details, see the documentation :ref:`Django's release process 45 <internals-release-process>` and our :ref:`deprecation timeline 46 <internals-deprecation>`.` 47 48 ``mod_python`` support 49 ---------------------- 50 51 The ``mod_python`` library has not had a release since 2007 or a commit since 52 2008. The Apache Foundation board voted to remove ``mod_python`` from the set 53 of active projects in its version control repositories, and its lead developer 54 has shifted all of his efforts toward the lighter, slimmer, more stable, and 55 more flexible ``mod_wsgi`` backend. 56 57 If you are currently using the ``mod_python`` request handler, it is strongly 58 encouraged you redeploy your Django instances using :ref:`mod_wsgi 59 <howto-deployment-modwsgi>`. 60 28 61 What's new in Django 1.3 29 62 ======================== 30 63 31 -
docs/internals/deprecation.txt
99 99 100 100 * The ``no`` language code has been deprecated in favor of the ``nb`` 101 101 language code. 102 103 * 1.5 104 * The ``mod_python`` request handler has been deprecated since the 1.3 105 release. The ``mod_wsgi`` handler should be used instead. 102 106 103 107 * 2.0 104 108 * ``django.views.defaults.shortcut()``. This function has been moved -
docs/index.txt
152 152 * **Deployment:** 153 153 :ref:`Overview <howto-deployment-index>` | 154 154 :ref:`Apache/mod_wsgi <howto-deployment-modwsgi>` | 155 :ref:`Apache/mod_python <howto-deployment-modpython>` |156 155 :ref:`FastCGI/SCGI/AJP <howto-deployment-fastcgi>` | 157 156 :ref:`Apache authentication <howto-apache-auth>` | 158 157 :ref:`Serving static files <howto-static-files>` | -
docs/topics/install.txt
34 34 need to set up Apache until you're ready to deploy Django in production. 35 35 36 36 If you want to use Django on a production site, use Apache with `mod_wsgi`_. 37 mod_wsgi is similar to mod_perl -- it embeds Python within Apache and loads 38 Python code into memory when the server starts. Code stays in memory throughout 39 the life of an Apache process, which leads to significant performance gains over 40 other server arrangements. Make sure you have Apache installed, with the 41 mod_wsgi module activated. Django will work with any version of Apache that 37 mod_wsgi can operate in one of two modes: an embedded mode and a daemon 38 mode. With the embedded mode, mod_wsgi is similar to mod_perl -- it embeds 39 Python within Apache and loads Python code into memory when the server starts. 40 Code stays in memory throughout the life of an Apache process, which leads to 41 significant performance gains over other server arrangements. With the daemon 42 mode, mod_wsgi spawns an independent daemon process that handles requests. The 43 daemon process can run as a different user than the webserver, possibly leading 44 to improved security, and the daemon process can be restarted without restarting 45 the entire Apache webserver, possibly making refreshing your codebase more 46 seamless. Consult the mod_wsgi documentation to determine which mode is right 47 for your setup. Make sure you have Apache installed, with the mod_wsgi module 48 activated. Django will work with any version of Apache that 42 49 supports mod_wsgi. 43 50 44 51 See :ref:`How to use Django with mod_wsgi <howto-deployment-modwsgi>` for 45 52 information on how to configure mod_wsgi once you have it installed. 46 53 47 54 If you can't use mod_wsgi for some reason, fear not: Django supports many other 48 deployment options. A great second choice is :ref:` mod_python49 <howto-deployment- modpython>`, the predecessor to mod_wsgi. Additionally, Django50 follows the WSGI_ spec, which allows it to run on a variety of server platforms. 51 See the `server-arrangements wiki page`_ for specific installation instructions 52 for each platform.55 deployment options. A great second choice is :ref:`FastCGI 56 <howto-deployment-fastcgi>`, perfect for using Django with servers other than 57 Apache. Additionally, Django follows the WSGI_ spec, which allows it to run on a 58 variety of server platforms. See the `server-arrangements wiki page`_ for 59 specific installation instructions for each platform. 53 60 54 61 .. _Apache: http://httpd.apache.org/ 55 62 .. _mod_wsgi: http://code.google.com/p/modwsgi/ … … 257 264 links. (Environment variables can be defined on Windows systems `from the 258 265 Control Panel`_.) 259 266 260 .. admonition:: What about Apache and mod_ python?267 .. admonition:: What about Apache and mod_wsgi? 261 268 262 269 If you take the approach of setting ``PYTHONPATH``, you'll need to 263 remember to do the same thing in your Apache configuration once you264 deploy your production site. Do this by setting ``PythonPath`` in your265 Apache configuration file.270 remember to do the same thing in your WSGI application once you 271 deploy your production site. Do this by appending to ``sys.path`` in your 272 WSGI application. 266 273 267 274 More information about deployment is available, of course, in our 268 :ref:`How to use Django with mod_ python <howto-deployment-modpython>`275 :ref:`How to use Django with mod_wsgi <howto-deployment-modwsgi>` 269 276 documentation. 270 277 271 278 4. On Unix-like systems, create a symbolic link to the file -
docs/faq/admin.txt
51 51 user from the request, the :meth:`ModelAdmin.queryset` and :meth:`ModelAdmin.has_change_permission` 52 52 can be used to control the visibility and editability of objects in the admin. 53 53 54 My admin-site CSS and images showed up fine using the development server, but they're not displaying when using mod_ python.54 My admin-site CSS and images showed up fine using the development server, but they're not displaying when using mod_wsgi. 55 55 --------------------------------------------------------------------------------------------------------------------------- 56 56 57 See :ref:`serving the admin files < howto-deployment-modpython-serving-the-admin-files>`58 in the "How to use Django with mod_ python" documentation.57 See :ref:`serving the admin files <serving-the-admin-files>` 58 in the "How to use Django with mod_wsgi" documentation. 59 59 60 60 My "list_filter" contains a ManyToManyField, but the filter doesn't display. 61 61 ---------------------------------------------------------------------------- -
docs/howto/deployment/index.txt
12 12 :maxdepth: 1 13 13 14 14 modwsgi 15 modpython16 15 fastcgi 16 How to use Django with Apache and mod_python (To be deprecated) <modpython> 17 17 18 18 If you're new to deploying Django and/or Python, we'd recommend you try 19 19 :ref:`mod_wsgi <howto-deployment-modwsgi>` first. In most cases it'll be the easiest,