Ticket #14281: 14281.diff
File 14281.diff, 4.5 KB (added by , 14 years ago) |
---|
-
docs/howto/deployment/modpython.txt
1 .. _howto-deployment-modpython:2 3 1 ============================================ 4 2 How to use Django with Apache and mod_python 5 3 ============================================ -
docs/topics/http/urls.txt
939 939 However, if your application constructs part of the URL hierarchy itself, you 940 940 may occasionally need to generate URLs. In that case, you need to be able to 941 941 find the base URL of the Django project within its web server 942 (normally, :func:`~django.core.urlresolvers.reverse` takes care of this for 942 (normally, :func:`~django.core.urlresolvers.reverse` takes care of this for 943 943 you). In that case, you can call ``get_script_prefix()``, which will return the 944 944 script prefix portion of the URL for your Django project. If your Django 945 945 project is at the root of its webserver, this is always ``"/"``, but it can be 946 changed, for instance by using ``django.root`` (see : ref:`How to use947 Django with Apache and mod_python < howto-deployment-modpython>`).946 changed, for instance by using ``django.root`` (see :doc:`How to use 947 Django with Apache and mod_python </howto/deployment/modpython>`). -
docs/topics/templates.txt
590 590 {{ comment }} 591 591 {% endfor %} 592 592 593 Similarly, :doc:`QuerySets< ref/models/querysets>` provide a ``count()`` method593 Similarly, :doc:`QuerySets</ref/models/querysets>` provide a ``count()`` method 594 594 to count the number of objects they contain. Therefore, you can obtain a count 595 595 of all comments related to the current task with:: 596 596 -
docs/topics/signals.txt
89 89 90 90 request_finished.connect(my_callback) 91 91 92 Alternatively, you can use a decorator used when you define your receiver: 92 Alternatively, you can use a ``receiver`` decorator when you define your 93 receiver: 93 94 94 95 .. code-block:: python 95 96 … … 102 103 103 104 Now, our ``my_callback`` function will be called each time a request finishes. 104 105 106 .. versionadded:: 1.3 107 108 The ``receiver`` decorator was added in Django 1.3. 109 105 110 .. admonition:: Where should this code live? 106 111 107 112 You can put signal handling and registration code anywhere you like. -
docs/ref/generic-views.txt
96 96 .. versionadded:: 1.1 97 97 The ``permanent`` keyword argument is new in Django 1.1. 98 98 99 .. versionadded:: 1.3 100 The ``query_string`` keyword argument is new in Django 1.3. 99 101 100 102 **Example:** 101 103 … … 380 382 381 383 * ``date_list``: A list of ``datetime.date`` objects representing all 382 384 days that have objects available in the given month, according to 383 ``queryset``, in ascending order. 385 ``queryset``, in ascending order. 384 386 385 387 * ``month``: A ``datetime.date`` object representing the given month. 386 388 -
docs/ref/request-response.txt
46 46 attr:`~HttpRequest.path` can make your code much easier to move between test 47 47 and deployment servers. 48 48 49 For example, if the ``django.root`` for your application is set to 49 For example, if the ``django.root`` for your application is set to 50 50 ``"/minfo"``, then ``path`` might be ``"/minfo/music/bands/the_beatles/"`` 51 51 and ``path_info`` would be ``"/music/bands/the_beatles/"``. 52 52 … … 542 542 543 543 .. _`cookie Morsel`: http://docs.python.org/library/cookie.html#Cookie.Morsel 544 544 545 .. versionchanged:: 1.3 546 547 Both the possibility of specifying a ``datetime.datetime`` object in 548 ``expires`` and the auto-calculation of ``max_age`` in such case were added 549 in Django 1.3. 550 545 551 .. method:: HttpResponse.delete_cookie(key, path='/', domain=None) 546 552 547 553 Deletes the cookie with the given key. Fails silently if the key doesn't