Ticket #16586: 16586.diff

File 16586.diff, 36.5 KB (added by aaugustin, 4 years ago)
  • docs/intro/tutorial03.txt

     
    122122``http://www.example.com/myapp/?page=3``, the URLconf will look for ``myapp/``.
    123123
    124124If you need help with regular expressions, see `Wikipedia's entry`_ and the
    125 `Python documentation`_. Also, the O'Reilly book "Mastering Regular Expressions"
    126 by Jeffrey Friedl is fantastic.
     125:mod:`Python documentation<re>`. Also, the O'Reilly book "Mastering Regular
     126Expressions" by Jeffrey Friedl is fantastic.
    127127
    128128Finally, a performance note: these regular expressions are compiled the first
    129129time the URLconf module is loaded. They're super fast.
    130130
    131131.. _Wikipedia's entry: http://en.wikipedia.org/wiki/Regular_expression
    132 .. _Python documentation: http://docs.python.org/library/re.html
    133132
    134133Write your first view
    135134=====================
  • docs/internals/contributing/writing-code/branch-policy.txt

     
    146146location of the branch's ``django`` package. If you want to switch back, just
    147147change the symlink to point to the old code.
    148148
    149 A third option is to use a `path file`_ (``<something>.pth``). First, make sure
    150 there are no files, directories or symlinks named ``django`` in your
     149A third option is to use a :mod:`path file<site>` (``<something>.pth``). First,
     150make sure there are no files, directories or symlinks named ``django`` in your
    151151``site-packages`` directory. Then create a text file named ``django.pth`` and
    152152save it to your ``site-packages`` directory. That file should contain a path to
    153153your copy of Django on a single line and optional comments. Here is an example
     
    168168    # On windows a path may look like this:
    169169    # C:/path/to/<branch>
    170170
    171 .. _path file: http://docs.python.org/library/site.html
    172171.. _django-developers: http://groups.google.com/group/django-developers
  • docs/howto/outputting-csv.txt

     
    33==========================
    44
    55This document explains how to output CSV (Comma Separated Values) dynamically
    6 using Django views. To do this, you can either use the `Python CSV library`_ or
    7 the Django template system.
     6using Django views. To do this, you can either use the Python CSV library or the
     7Django template system.
    88
    9 .. _Python CSV library: http://docs.python.org/library/csv.html
    10 
    119Using the Python CSV library
    1210============================
    1311
    14 Python comes with a CSV library, ``csv``. The key to using it with Django is
    15 that the ``csv`` module's CSV-creation capability acts on file-like objects, and
    16 Django's :class:`~django.http.HttpResponse` objects are file-like objects.
     12Python comes with a CSV library, :mod:`csv`. The key to using it with Django is
     13that the :mod:`csv` module's CSV-creation capability acts on file-like objects,
     14and Django's :class:`~django.http.HttpResponse` objects are file-like objects.
    1715
    1816Here's an example::
    1917
     
    7270    * Use the `python-unicodecsv module`_, which aims to be a drop-in
    7371      replacement for ``csv`` that gracefully handles Unicode.
    7472
    75 For more information, see the Python `CSV File Reading and Writing`_
     73For more information, see the Python :mod:`CSV File Reading and Writing<csv>`
    7674documentation.
    7775
    7876.. _`csv module's examples section`: http://docs.python.org/library/csv.html#examples
    7977.. _`python-unicodecsv module`: https://github.com/jdunck/python-unicodecsv
    80 .. _`CSV File Reading and Writing`: http://docs.python.org/library/csv.html
    8178
    8279Using the template system
    8380=========================
  • docs/howto/custom-template-tags.txt

     
    335335
    336336For example, let's write a template tag, ``{% current_time %}``, that displays
    337337the current date/time, formatted according to a parameter given in the tag, in
    338 `strftime syntax`_. It's a good idea to decide the tag syntax before anything
    339 else. In our case, let's say the tag should be used like this:
     338:func:`strftime syntax<time.strftime>`. It's a good idea to decide the tag
     339syntax before anything else. In our case, let's say the tag should be used like
     340this:
    340341
    341342.. code-block:: html+django
    342343
    343344    <p>The time is {% current_time "%Y-%m-%d %I:%M %p" %}.</p>
    344345
    345 .. _`strftime syntax`: http://docs.python.org/library/time.html#time.strftime
    346 
    347346The parser for this function should grab the parameter and create a ``Node``
    348347object::
    349348
  • docs/howto/outputting-pdf.txt

     
    9797============
    9898
    9999If you're creating a complex PDF document with ReportLab, consider using the
    100 cStringIO_ library as a temporary holding place for your PDF file. The cStringIO
    101 library provides a file-like object interface that is particularly efficient.
    102 Here's the above "Hello World" example rewritten to use ``cStringIO``::
     100:mod:`cStringIO` library as a temporary holding place for your PDF file. The
     101``cStringIO`` library provides a file-like object interface that is particularly
     102efficient. Here's the above "Hello World" example rewritten to use
     103``cStringIO``::
    103104
    104105    # Fall back to StringIO in environments where cStringIO is not available
    105106    try:
     
    133134        response.write(pdf)
    134135        return response
    135136
    136 .. _cStringIO: http://docs.python.org/library/stringio.html#module-cStringIO
    137 
    138137Further resources
    139138=================
    140139
  • docs/topics/http/file-uploads.txt

     
    149149
    150150    :setting:`FILE_UPLOAD_PERMISSIONS`
    151151        The numeric mode (i.e. ``0644``) to set newly uploaded files to. For
    152         more information about what these modes mean, see the `documentation for
    153         os.chmod`_
     152        more information about what these modes mean, see the documentation for
     153        :func:`os.chmod`.
    154154
    155155        If this isn't given or is ``None``, you'll get operating-system
    156156        dependent behavior. On most platforms, temporary files will have a mode
     
    179179        Which means "try to upload to memory first, then fall back to temporary
    180180        files."
    181181
    182 .. _documentation for os.chmod: http://docs.python.org/library/os.html#os.chmod
    183 
    184182``UploadedFile`` objects
    185183========================
    186184
  • docs/topics/http/sessions.txt

     
    549549=================
    550550
    551551    * The session dictionary should accept any pickleable Python object. See
    552       `the pickle module`_ for more information.
     552      :mod:`the pickle module <pickle>` for more information.
    553553
    554554    * Session data is stored in a database table named ``django_session`` .
    555555
    556556    * Django only sends a cookie if it needs to. If you don't set any session
    557557      data, it won't send a session cookie.
    558558
    559 .. _`the pickle module`: http://docs.python.org/library/pickle.html
    560 
    561559Session IDs in URLs
    562560===================
    563561
  • docs/topics/testing.txt

     
    6868Writing unit tests
    6969------------------
    7070
    71 Django's unit tests use a Python standard library module: unittest_. This
     71Django's unit tests use a Python standard library module: :mod:`unittest`. This
    7272module defines tests in class-based approach.
    7373
    7474.. admonition:: unittest2
     
    136136Python documentation for more details on how to construct a complex test
    137137suite.
    138138
    139 For more details about ``unittest``, see the `standard library unittest
    140 documentation`_.
     139For more details about ``unittest``, see the :mod:`standard library unittest
     140documentation <unittest>`.
    141141
    142 .. _unittest: http://docs.python.org/library/unittest.html
    143 .. _standard library unittest documentation: unittest_
    144142.. _suggested organization: http://docs.python.org/library/unittest.html#organizing-tests
    145143
    146144Writing doctests
    147145----------------
    148146
    149 Doctests use Python's standard doctest_ module, which searches your docstrings
    150 for statements that resemble a session of the Python interactive interpreter.
    151 A full explanation of how doctest works is out of the scope of this document;
    152 read Python's official documentation for the details.
     147Doctests use :mod:`Python's standard doctest module <doctest>`, which searches
     148your docstrings for statements that resemble a session of the Python interactive
     149interpreter. A full explanation of how doctest works is out of the scope of this
     150document; read Python's official documentation for the details.
    153151
    154152.. admonition:: What's a **docstring**?
    155153
     
    221219on this.) Note that to use this feature, the database user Django is connecting
    222220as must have ``CREATE DATABASE`` rights.
    223221
    224 For more details about how doctest works, see the `standard library
    225 documentation for doctest`_.
     222For more details about how doctest works, see the :mod:`standard library
     223documentation for doctest<doctest>`.
    226224
    227 .. _doctest: http://docs.python.org/library/doctest.html
    228 .. _standard library documentation for doctest: doctest_
    229 
    230 
    231225Which should I use?
    232226-------------------
    233227
     
    639633
    640634      The test client is not capable of retrieving Web pages that are not
    641635      powered by your Django project. If you need to retrieve other Web pages,
    642       use a Python standard library module such as urllib_ or urllib2_.
     636      use a Python standard library module such as :mod:`urllib` or
     637      :mod:`urllib2`.
    643638
    644639    * To resolve URLs, the test client uses whatever URLconf is pointed-to by
    645640      your :setting:`ROOT_URLCONF` setting.
     
    668663          >>> from django.test import Client
    669664          >>> csrf_client = Client(enforce_csrf_checks=True)
    670665
    671 
    672 .. _urllib: http://docs.python.org/library/urllib.html
    673 .. _urllib2: http://docs.python.org/library/urllib2.html
    674 
    675666Making requests
    676667~~~~~~~~~~~~~~~
    677668
     
    1003994.. attribute:: Client.cookies
    1004995
    1005996    A Python ``SimpleCookie`` object, containing the current values of all the
    1006     client cookies. See the `Cookie module documentation`_ for more.
     997    client cookies. See the :mod:`Cookie module documentation<cookie>` for more.
    1007998
    1008999.. attribute:: Client.session
    10091000
     
    10191010            session['somekey'] = 'test'
    10201011            session.save()
    10211012
    1022 .. _Cookie module documentation: http://docs.python.org/library/cookie.html
    1023 
    10241013Example
    10251014~~~~~~~
    10261015
  • docs/topics/logging.txt

     
    1111======================
    1212
    1313Django uses Python's builtin logging module to perform system logging.
    14 The usage of the logging module is discussed in detail in `Python's
    15 own documentation`_. However, if you've never used Python's logging
     14The usage of the logging module is discussed in detail in :mod:`Python's
     15own documentation <logging>`. However, if you've never used Python's logging
    1616framework (or even if you have), here's a quick primer.
    1717
    18 .. _Python's own documentation: http://docs.python.org/library/logging.html
    19 
    2018The cast of players
    2119-------------------
    2220
  • docs/topics/email.txt

     
    55.. module:: django.core.mail
    66   :synopsis: Helpers to easily send email.
    77
    8 Although Python makes sending email relatively easy via the `smtplib
    9 library`_, Django provides a couple of light wrappers over it. These wrappers
    10 are provided to make sending email extra quick, to make it easy to test
    11 email sending during development, and to provide support for platforms that
    12 can't use SMTP.
     8Although Python makes sending email relatively easy via the :mod:`smtplib module
     9<smtplib>`, Django provides a couple of light wrappers over it. These wrappers
     10are provided to make sending email extra quick, to make it easy to test email
     11sending during development, and to provide support for platforms that can't use
     12SMTP.
    1313
    1414The code lives in the ``django.core.mail`` module.
    1515
    16 .. _smtplib library: http://docs.python.org/library/smtplib.html
    17 
    1816Quick example
    1917=============
    2018
     
    5452      member of ``recipient_list`` will see the other recipients in the "To:"
    5553      field of the email message.
    5654    * ``fail_silently``: A boolean. If it's ``False``, ``send_mail`` will raise
    57       an ``smtplib.SMTPException``. See the `smtplib docs`_ for a list of
    58       possible exceptions, all of which are subclasses of ``SMTPException``.
     55      an ``smtplib.SMTPException``. See the :mod:`smtplib docs <smtplib>` for a
     56      list of possible exceptions, all of which are subclasses of
     57      ``SMTPException``.
    5958    * ``auth_user``: The optional username to use to authenticate to the SMTP
    6059      server. If this isn't provided, Django will use the value of the
    6160      :setting:`EMAIL_HOST_USER` setting.
     
    6766      See the documentation on :ref:`Email backends <topic-email-backends>`
    6867      for more details.
    6968
    70 .. _smtplib docs: http://docs.python.org/library/smtplib.html
    71 
    7269send_mass_mail()
    7370================
    7471
     
    608605:setting:`EMAIL_PORT` accordingly, and you are set.
    609606
    610607For a more detailed discussion of testing and processing of emails locally,
    611 see the Python documentation on the `SMTP Server`_.
     608see the Python documentation on the :mod:`SMTP Server <smtpd>`.
    612609
    613 .. _SMTP Server: http://docs.python.org/library/smtpd.html
    614 
    615610SMTPConnection
    616611==============
    617612
  • docs/releases/1.3.txt

     
    664664
    665665Code taking advantage of any of the features below will raise a
    666666``PendingDeprecationWarning`` in Django 1.3. This warning will be
    667 silent by default, but may be turned on using Python's `warnings
    668 module`_, or by running Python with a ``-Wd`` or `-Wall` flag.
     667silent by default, but may be turned on using Python's :mod:`warnings
     668module <warnings>`, or by running Python with a ``-Wd`` or `-Wall` flag.
    669669
    670 .. _warnings module: http://docs.python.org/library/warnings.html
    671 
    672670In Django 1.4, these warnings will become a ``DeprecationWarning``,
    673671which is *not* silent. In Django 1.5 support for these features will
    674672be removed entirely.
  • docs/releases/1.3-alpha-1.txt

     
    279279
    280280Code taking advantage of any of the features below will raise a
    281281``PendingDeprecationWarning`` in Django 1.3. This warning will be
    282 silent by default, but may be turned on using Python's `warnings
    283 module`_, or by running Python with a ``-Wd`` or `-Wall` flag.
     282silent by default, but may be turned on using Python's :mod:`warnings
     283module <warnings>`, or by running Python with a ``-Wd`` or `-Wall` flag.
    284284
    285 .. _warnings module: http://docs.python.org/library/warnings.html
    286 
    287285In Django 1.4, these warnings will become a ``DeprecationWarning``,
    288286which is *not* silent. In Django 1.5 support for these features will
    289287be removed entirely.
  • docs/releases/0.96.txt

     
    216216------------------
    217217
    218218Django now includes a test framework so you can start transmuting fear into
    219 boredom (with apologies to Kent Beck). You can write tests based on doctest_
    220 or unittest_ and test your views with a simple test client.
     219boredom (with apologies to Kent Beck). You can write tests based on
     220:mod:`doctest` or :mod:`unittest` and test your views with a simple test client.
    221221
    222222There is also new support for "fixtures" -- initial data, stored in any of the
    223223supported `serialization formats`_, that will be loaded into your database at the
     
    225225
    226226See `the testing documentation`_ for the full details.
    227227
    228 .. _doctest: http://docs.python.org/library/doctest.html
    229 .. _unittest: http://docs.python.org/library/unittest.html
    230228.. _the testing documentation: http://www.djangoproject.com/documentation/0.96/testing/
    231229.. _serialization formats: http://www.djangoproject.com/documentation/0.96/serialization/
    232230
  • docs/releases/1.2.txt

     
    764764
    765765Code taking advantage of any of the features below will raise a
    766766``PendingDeprecationWarning`` in Django 1.2. This warning will be
    767 silent by default, but may be turned on using Python's `warnings
    768 module`_, or by running Python with a ``-Wd`` or `-Wall` flag.
     767silent by default, but may be turned on using Python's :mod:`warnings
     768module <warnings>`, or by running Python with a ``-Wd`` or `-Wall` flag.
    769769
    770 .. _warnings module: http://docs.python.org/library/warnings.html
    771 
    772770In Django 1.3, these warnings will become a ``DeprecationWarning``,
    773771which is *not* silent. In Django 1.4 support for these features will
    774772be removed entirely.
  • docs/ref/models/querysets.txt

     
    8181Pickling QuerySets
    8282------------------
    8383
    84 If you pickle_ a ``QuerySet``, this will force all the results to be loaded
     84If you :mod:`pickle` a ``QuerySet``, this will force all the results to be loaded
    8585into memory prior to pickling. Pickling is usually used as a precursor to
    8686caching and when the cached queryset is reloaded, you want the results to
    8787already be present and ready for use (reading from the database can take some
     
    112112        Django version N+1. Pickles should not be used as part of a long-term
    113113        archival strategy.
    114114
    115 .. _pickle: http://docs.python.org/library/pickle.html
    116 
    117115.. _queryset-api:
    118116
    119117QuerySet API
  • docs/ref/models/fields.txt

     
    500500    setting to determine the value of the :attr:`~django.core.files.File.url`
    501501    attribute.
    502502
    503     This path may contain `strftime formatting`_, which will be replaced by the
    504     date/time of the file upload (so that uploaded files don't fill up the given
    505     directory).
     503    This path may contain :func:`strftime formatting <time.strftime>`, which
     504    will be replaced by the date/time of the file upload (so that uploaded files
     505    don't fill up the given directory).
    506506
    507507    This may also be a callable, such as a function, which will be called to
    508508    obtain the upload path, including the filename. This callable must be able
     
    560560
    561561For example, say your :setting:`MEDIA_ROOT` is set to ``'/home/media'``, and
    562562:attr:`~FileField.upload_to` is set to ``'photos/%Y/%m/%d'``. The ``'%Y/%m/%d'``
    563 part of :attr:`~FileField.upload_to` is `strftime formatting`_; ``'%Y'`` is the
    564 four-digit year, ``'%m'`` is the two-digit month and ``'%d'`` is the two-digit
    565 day. If you upload a file on Jan. 15, 2007, it will be saved in the directory
    566 ``/home/media/photos/2007/01/15``.
     563part of :attr:`~FileField.upload_to` is :func:`strftime formatting
     564<time.strftime>`; ``'%Y'`` is the four-digit year, ``'%m'`` is the two-digit
     565month and ``'%d'`` is the two-digit day. If you upload a file on Jan. 15, 2007,
     566it will be saved in the directory ``/home/media/photos/2007/01/15``.
    567567
    568568If you wanted to retrieve the uploaded file's on-disk filename, or the file's
    569569size, you could use the :attr:`~django.core.files.File.name` and
     
    595595created as ``varchar(100)`` columns in your database. As with other fields, you
    596596can change the maximum length using the :attr:`~CharField.max_length` argument.
    597597
    598 .. _`strftime formatting`: http://docs.python.org/library/time.html#time.strftime
    599 
    600598FileField and FieldFile
    601599~~~~~~~~~~~~~~~~~~~~~~~
    602600
     
    712710    represent those numbers differently. ``FloatField`` uses Python's ``float``
    713711    type internally, while ``DecimalField`` uses Python's ``Decimal`` type. For
    714712    information on the difference between the two, see Python's documentation on
    715     `Decimal fixed point and floating point arithmetic`_.
     713    :mod:`Decimal fixed point and floating point arithmetic <decimal>`.
    716714
    717 .. _Decimal fixed point and floating point arithmetic: http://docs.python.org/library/decimal.html
    718 
    719 
    720715``ImageField``
    721716--------------
    722717
  • docs/ref/generic-views.txt

     
    346346
    347347**Optional arguments:**
    348348
    349     * ``month_format``: A format string that regulates what format the
    350       ``month`` parameter uses. This should be in the syntax accepted by
    351       Python's ``time.strftime``. (See the `strftime docs`_.) It's set to
    352       ``"%b"`` by default, which is a three-letter month abbreviation. To
    353       change it to use numbers, use ``"%m"``.
     349    * ``month_format``: A format string that regulates what format the ``month``
     350      parameter uses. This should be in the syntax accepted by Python's
     351      :func:`time.strftime``. It's set to ``"%b"`` by default, which is a
     352      three-letter month abbreviation. To change it to use numbers, use
     353      ``"%m"``.
    354354
    355355    * ``template_name``: The full name of a template to use in rendering the
    356356      page. This lets you override the default template name (see below).
     
    415415      is ``'object'`` by default. If ``template_object_name`` is ``'foo'``,
    416416      this variable's name will be ``foo_list``.
    417417
    418 .. _strftime docs: http://docs.python.org/library/time.html#time.strftime
    419 
    420418``django.views.generic.date_based.archive_week``
    421419------------------------------------------------
    422420
     
    516514
    517515**Optional arguments:**
    518516
    519     * ``month_format``: A format string that regulates what format the
    520       ``month`` parameter uses. This should be in the syntax accepted by
    521       Python's ``time.strftime``. (See the `strftime docs`_.) It's set to
    522       ``"%b"`` by default, which is a three-letter month abbreviation. To
    523       change it to use numbers, use ``"%m"``.
     517    * ``month_format``: A format string that regulates what format the ``month``
     518      parameter uses. This should be in the syntax accepted by Python's
     519      :func:`time.strftime`. It's set to ``"%b"`` by default, which is a
     520      three-letter month abbreviation. To change it to use numbers, use
     521      ``"%m"``.
    524522
    525523    * ``day_format``: Like ``month_format``, but for the ``day`` parameter.
    526524      It defaults to ``"%d"`` (day of the month as a decimal number, 01-31).
     
    624622
    625623**Optional arguments:**
    626624
    627     * ``month_format``: A format string that regulates what format the
    628       ``month`` parameter uses. This should be in the syntax accepted by
    629       Python's ``time.strftime``. (See the `strftime docs`_.) It's set to
    630       ``"%b"`` by default, which is a three-letter month abbreviation. To
    631       change it to use numbers, use ``"%m"``.
     625    * ``month_format``: A format string that regulates what format the ``month``
     626      parameter uses. This should be in the syntax accepted by Python's
     627      :func:`time.strftime`. It's set to ``"%b"`` by default, which is a
     628      three-letter month abbreviation. To change it to use numbers, use
     629      ``"%m"``.
    632630
    633631    * ``day_format``: Like ``month_format``, but for the ``day`` parameter.
    634632      It defaults to ``"%d"`` (day of the month as a decimal number, 01-31).
  • docs/ref/class-based-views.txt

     
    586586
    587587    .. attribute:: year_format
    588588
    589         The strftime_ format to use when parsing the year. By default, this is
    590         ``'%Y'``.
     589        The :func:`strftime<time.strftime>` format to use when parsing the year.
     590        By default, this is ``'%Y'``.
    591591
    592     .. _strftime: http://docs.python.org/library/time.html#time.strftime
    593 
    594592    .. attribute:: year
    595593
    596594        **Optional** The value for the year (as a string). By default, set to
     
    598596
    599597    .. method:: get_year_format()
    600598
    601         Returns the strftime_ format to use when parsing the year. Returns
     599        Returns the :func:`strftime<time.strftime>` format to use when parsing the year. Returns
    602600        :attr:`YearMixin.year_format` by default.
    603601
    604602    .. method:: get_year()
     
    621619
    622620    .. attribute:: month_format
    623621
    624         The strftime_ format to use when parsing the month. By default, this is
     622        The :func:`strftime<time.strftime>` format to use when parsing the month. By default, this is
    625623        ``'%b'``.
    626624
    627625    .. attribute:: month
     
    631629
    632630    .. method:: get_month_format()
    633631
    634         Returns the strftime_ format to use when parsing the month. Returns
     632        Returns the :func:`strftime<time.strftime>` format to use when parsing the month. Returns
    635633        :attr:`MonthMixin.month_format` by default.
    636634
    637635    .. method:: get_month()
     
    667665
    668666    .. attribute:: day_format
    669667
    670         The strftime_ format to use when parsing the day. By default, this is
     668        The :func:`strftime<time.strftime>` format to use when parsing the day. By default, this is
    671669        ``'%d'``.
    672670
    673671    .. attribute:: day
     
    677675
    678676    .. method:: get_day_format()
    679677
    680         Returns the strftime_ format to use when parsing the day. Returns
     678        Returns the :func:`strftime<time.strftime>` format to use when parsing the day. Returns
    681679        :attr:`DayMixin.day_format` by default.
    682680
    683681    .. method:: get_day()
     
    712710
    713711    .. attribute:: week_format
    714712
    715         The strftime_ format to use when parsing the week. By default, this is
     713        The :func:`strftime<time.strftime>` format to use when parsing the week. By default, this is
    716714        ``'%U'``.
    717715
    718716    .. attribute:: week
     
    722720
    723721    .. method:: get_week_format()
    724722
    725         Returns the strftime_ format to use when parsing the week. Returns
     723        Returns the :func:`strftime<time.strftime>` format to use when parsing the week. Returns
    726724        :attr:`WeekMixin.week_format` by default.
    727725
    728726    .. method:: get_week()
  • docs/ref/templates/builtins.txt

     
    12541254    c                 ISO 8601 format. (Note: unlike others     ``2008-01-02T10:30:00.000123+02:00``,
    12551255                      formatters, such as "Z", "O" or "r",      or ``2008-01-02T10:30:00.000123`` if the datetime is naive
    12561256                      the "c" formatter will not add timezone
    1257                       offset if value is a `naive datetime`_.)
     1257                      offset if value is a :class:`naive
     1258                      datetime <datetime.tzinfo>`.)
    12581259    d                 Day of the month, 2 digits with           ``'01'`` to ``'31'``
    12591260                      leading zeros.
    12601261    D                 Day of the week, textual, 3 letters.      ``'Fri'``
     
    13461347.. versionchanged:: 1.2
    13471348    Predefined formats can now be influenced by the current locale.
    13481349
    1349 .. _naive datetime: http://docs.python.org/library/datetime.html#datetime.tzinfo
    1350 
    13511350.. templatefilter:: default
    13521351
    13531352default
     
    18151814pprint
    18161815^^^^^^
    18171816
    1818 A wrapper around `pprint.pprint`__ -- for debugging, really.
     1817A wrapper around :func:`pprint.pprint` -- for debugging, really.
    18191818
    1820 __ http://docs.python.org/library/pprint.html
    1821 
    18221819.. templatefilter:: random
    18231820
    18241821random
  • docs/ref/exceptions.txt

     
    147147Python Exceptions
    148148=================
    149149
    150 Django raises built-in Python exceptions when appropriate as well. See
    151 the Python `documentation`_ for further information on the built-in
    152 exceptions.
    153 
    154 .. _`documentation`: http://docs.python.org/lib/module-exceptions.html
     150Django raises built-in Python exceptions when appropriate as well. See the
     151:mod:`Python documentation <exceptions>` for further information on the
     152built-in exceptions.
  • docs/ref/contrib/gis/install.txt

     
    12351235    postgres# CREATE DATABASE geodjango OWNER geodjango TEMPLATE template_postgis ENCODING 'utf8';
    12361236
    12371237.. rubric:: Footnotes
    1238 .. [#] The datum shifting files are needed for converting data to and from certain projections.
    1239        For example, the PROJ.4 string for the `Google projection (900913) <http://spatialreference.org/ref/epsg/900913/proj4>`_
    1240        requires the ``null`` grid file only included in the extra datum shifting files.
    1241        It is easier to install the shifting files now, then to have debug a problem caused by their absence later.
    1242 .. [#] Specifically, GeoDjango provides support for the `OGR <http://gdal.org/ogr>`_ library, a component of GDAL.
     1238.. [#] The datum shifting files are needed for converting data to and from
     1239       certain projections.
     1240       For example, the PROJ.4 string for the `Google projection (900913)
     1241       <http://spatialreference.org/ref/epsg/900913/proj4>`_ requires the
     1242       ``null`` grid file only included in the extra datum shifting files.
     1243       It is easier to install the shifting files now, then to have debug a
     1244       problem caused by their absence later.
     1245.. [#] Specifically, GeoDjango provides support for the `OGR
     1246       <http://gdal.org/ogr>`_ library, a component of GDAL.
    12431247.. [#] See `GDAL ticket #2382 <http://trac.osgeo.org/gdal/ticket/2382>`_.
    1244 .. [#] GeoDjango uses the `find_library <http://docs.python.org/library/ctypes.html#finding-shared-libraries>`_
    1245        routine from ``ctypes.util`` to locate shared libraries.
     1248.. [#] GeoDjango uses the :func:`find_library <ctypes.util.find_library>`
     1249       routine from :mod:`ctypes.util` to locate shared libraries.
    12461250.. [#] The ``psycopg2`` Windows installers are packaged and maintained by
    12471251       `Jason Erickson <http://www.stickpeople.com/projects/python/win-psycopg/>`_.
  • docs/ref/contrib/syndication.txt

     
    852852
    853853    All parameters, if given, should be Unicode objects, except:
    854854
    855         * ``pubdate`` should be a `Python datetime object`_.
     855        * ``pubdate`` should be a :class:`Python datetime object<datetime.datetime>`.
    856856        * ``enclosure`` should be an instance of ``feedgenerator.Enclosure``.
    857857        * ``categories`` should be a sequence of Unicode objects.
    858858
     
    884884    </feed>
    885885
    886886.. _django/utils/feedgenerator.py: http://code.djangoproject.com/browser/django/trunk/django/utils/feedgenerator.py
    887 .. _Python datetime object: http://docs.python.org/library/datetime.html#datetime-objects
    888887
    889888.. currentmodule:: django.contrib.syndication
    890889
     
    913912
    914913``SyndicationFeed.add_root_elements(self, handler)``
    915914    Callback to add elements inside the root feed element
    916     (``feed``/``channel``). ``handler`` is an `XMLGenerator`_ from Python's
    917     built-in SAX library; you'll call methods on it to add to the XML
    918     document in process.
     915    (``feed``/``channel``). ``handler`` is an :class:`XMLGenerator
     916    <xml.sax.saxutils.XMLGenerator>` from Python's built-in SAX library; you'll
     917    call methods on it to add to the XML document in process.
    919918
    920919``SyndicationFeed.item_attributes(self, item)``
    921920    Return a ``dict`` of attributes to add to each item (``item``/``entry``)
     
    945944
    946945Obviously there's a lot more work to be done for a complete custom feed class,
    947946but the above example should demonstrate the basic idea.
    948 
    949 .. _XMLGenerator: http://docs.python.org/dev/library/xml.sax.utils.html#xml.sax.saxutils.XMLGenerator
  • docs/ref/request-response.txt

     
    645645    ``expires``, and the auto-calculation of ``max_age`` in such case
    646646    was added. The ``httponly`` argument was also added.
    647647
    648     Sets a cookie. The parameters are the same as in the `cookie Morsel`_
    649     object in the Python standard library.
     648    Sets a cookie. The parameters are the same as in the :class:`cookie Morsel
     649    <Cookie.Morsel>` object in the Python standard library.
    650650
    651651        * ``max_age`` should be a number of seconds, or ``None`` (default) if
    652652          the cookie should last only as long as the client's browser session.
     
    670670          risk of client side script accessing the protected cookie
    671671          data.
    672672
    673     .. _`cookie Morsel`: http://docs.python.org/library/cookie.html#Cookie.Morsel
    674673    .. _HTTPOnly: http://www.owasp.org/index.php/HTTPOnly
    675674
    676675.. method:: HttpResponse.set_signed_cookie(key, value='', salt='', max_age=None, expires=None, path='/', domain=None, secure=None, httponly=False)
  • docs/ref/django-admin.txt

     
    455455.. django-admin-option:: --ignore
    456456
    457457Use the ``--ignore`` or ``-i`` option to ignore files or directories matching
    458 the given `glob-style pattern`_. Use multiple times to ignore more.
     458the given :mod:`glob-style pattern <glob>`. Use multiple times to ignore more.
    459459
    460460These patterns are used by default: ``'CVS'``, ``'.*'``, ``'*~'``
    461461
     
    463463
    464464    django-admin.py makemessages --locale=en_US --ignore=apps/* --ignore=secret/*.html
    465465
    466 .. _`glob-style pattern`: http://docs.python.org/library/glob.html
    467 
    468466.. django-admin-option:: --no-default-ignore
    469467
    470468Use the ``--no-default-ignore`` option to disable the default values of
  • docs/ref/settings.txt

     
    950950Default: ``None``
    951951
    952952The numeric mode (i.e. ``0644``) to set newly uploaded files to. For
    953 more information about what these modes mean, see the `documentation for
    954 os.chmod`_
     953more information about what these modes mean, see the documentation for
     954:func:`os.chmod`.
    955955
    956956If this isn't given or is ``None``, you'll get operating-system
    957957dependent behavior. On most platforms, temporary files will have a mode
     
    968968    get totally incorrect behavior.
    969969
    970970
    971 .. _documentation for os.chmod: http://docs.python.org/library/os.html#os.chmod
    972 
    973971.. setting:: FILE_UPLOAD_TEMP_DIR
    974972
    975973FILE_UPLOAD_TEMP_DIR
  • docs/conf.py

     
    2626
    2727# Add any Sphinx extension module names here, as strings. They can be extensions
    2828# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
    29 extensions = ["djangodocs"]
     29extensions = ["djangodocs", "sphinx.ext.intersphinx"]
    3030
    3131# Add any paths that contain templates here, relative to this directory.
    3232# templates_path = []
     
    9292# Note: exclude_dirnames is new in Sphinx 0.5
    9393exclude_dirnames = ['.svn']
    9494
     95# Links to Python's docs should reference the most recent version of the 2.x
     96# branch, which is located at this URL.
     97intersphinx_mapping = {'python': ('http://docs.python.org', None)}
     98
     99# Python's docs don't change every week.
     100intersphinx_cache_limit = 90 # days
     101
    95102# -- Options for HTML output ---------------------------------------------------
    96103
    97104# The theme to use for HTML and HTML Help pages.  See the documentation for
Back to Top