Commit e77f1614 authored by Jannis Leidel's avatar Jannis Leidel
Browse files

Fixed #14281 -- A few documentation fixes. Thanks, Ramiro and Timo.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@13964 bcc190cf-cafb-0310-a4f2-bffc1f526a37
parent 136bf006
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
.. _howto-deployment-modpython:

============================================
How to use Django with Apache and mod_python
============================================
+3 −1
Original line number Diff line number Diff line
@@ -96,6 +96,8 @@ If the given URL is ``None``, Django will return an ``HttpResponseGone`` (410).
.. versionadded:: 1.1
    The ``permanent`` keyword argument is new in Django 1.1.

.. versionadded:: 1.3
    The ``query_string`` keyword argument is new in Django 1.3.

**Example:**

+8 −2
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@ All attributes except ``session`` should be considered read-only.
    Under some web server configurations, the portion of the URL after the host
    name is split up into a script prefix portion and a path info portion
    (this happens, for example, when using the ``django.root`` option
    with the :ref:`modpython handler from Apache <howto-deployment-modpython>`).
    with the :doc:`modpython handler from Apache </howto/deployment/modpython>`).
    The ``path_info`` attribute always contains the path info portion of the
    path, no matter what web server is being used. Using this instead of
    attr:`~HttpRequest.path` can make your code much easier to move between test
@@ -542,6 +542,12 @@ Methods

    .. _`cookie Morsel`: http://docs.python.org/library/cookie.html#Cookie.Morsel

    .. versionchanged:: 1.3

    Both the possibility of specifying a ``datetime.datetime`` object in
    ``expires`` and the auto-calculation of ``max_age`` in such case were added
    in Django 1.3.

.. method:: HttpResponse.delete_cookie(key, path='/', domain=None)

    Deletes the cookie with the given key. Fails silently if the key doesn't
+3 −3
Original line number Diff line number Diff line
@@ -943,5 +943,5 @@ find the base URL of the Django project within its web server
you). In that case, you can call ``get_script_prefix()``, which will return the
script prefix portion of the URL for your Django project. If your Django
project is at the root of its webserver, this is always ``"/"``, but it can be
changed, for instance  by using ``django.root`` (see :ref:`How to use
Django with Apache and mod_python <howto-deployment-modpython>`).
changed, for instance  by using ``django.root`` (see :doc:`How to use
Django with Apache and mod_python </howto/deployment/modpython>`).
+6 −1
Original line number Diff line number Diff line
@@ -89,7 +89,8 @@ manual connect route:

    request_finished.connect(my_callback)

Alternatively, you can use a decorator used when you define your receiver:
Alternatively, you can use a ``receiver`` decorator when you define your
receiver:

.. code-block:: python

@@ -102,6 +103,10 @@ Alternatively, you can use a decorator used when you define your receiver:

Now, our ``my_callback`` function will be called each time a request finishes.

.. versionadded:: 1.3

The ``receiver`` decorator was added in Django 1.3.

.. admonition:: Where should this code live?

    You can put signal handling and registration code anywhere you like.
Loading