Commit 932b1b8d authored by Ramiro Morales's avatar Ramiro Morales
Browse files

Converted links to external topics so they use intersphinx extension markup.

This allows to make these links more resilent to changes in the target URLs.
Thanks Jannis for the report and Aymeric Augustin for the patch.

Fixes #16586.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16720 bcc190cf-cafb-0310-a4f2-bffc1f526a37
parent 9110257a
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -26,7 +26,7 @@ needs_sphinx = '1.0'

# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ["djangodocs"]
extensions = ["djangodocs", "sphinx.ext.intersphinx"]

# Add any paths that contain templates here, relative to this directory.
# templates_path = []
@@ -92,6 +92,16 @@ pygments_style = 'trac'
# Note: exclude_dirnames is new in Sphinx 0.5
exclude_dirnames = ['.svn']

# Links to Python's docs should reference the most recent version of the 2.x
# branch, which is located at this URL.
intersphinx_mapping = {
    'python': ('http://docs.python.org/2.7', None),
    'sphinx': ('http://sphinx.pocoo.org/', None),
}

# Python's docs don't change every week.
intersphinx_cache_limit = 90 # days

# -- Options for HTML output ---------------------------------------------------

# The theme to use for HTML and HTML Help pages.  See the documentation for
+5 −8
Original line number Diff line number Diff line
@@ -22,8 +22,8 @@ usage.

For a development environment -- if you just want to experiment with Django --
you don't need to have a separate Web server installed; Django comes with its
own lightweight development server. For a production environment, Django
follows the WSGI_ spec, which means it can run on a variety of server
own lightweight development server. For a production environment, Django follows
the WSGI spec, :pep:`3333`, which means it can run on a variety of server
platforms. See :doc:`Deploying Django </howto/deployment/index>` for some
popular alternatives. Also, the `server arrangements wiki page`_ contains
details for several deployment strategies.
@@ -33,7 +33,6 @@ also need a database engine. PostgreSQL_ is recommended, because we're
PostgreSQL fans, and MySQL_, `SQLite 3`_, and Oracle_ are also supported.

.. _Python: http://www.python.org/
.. _WSGI: http://www.python.org/dev/peps/pep-0333/
.. _server arrangements wiki page: http://code.djangoproject.com/wiki/ServerArrangements
.. _PostgreSQL: http://www.postgresql.org/
.. _MySQL: http://www.mysql.com/
@@ -48,7 +47,7 @@ version of Python from 2.5 through 2.7, inclusive. However, newer versions of
Python are often faster, have more features, and are better supported. If you
use a newer version of Python you will also have access to some APIs that
aren't available under older versions of Python. For example, since Python 2.6,
you can use the advanced string formatting described in `PEP 3101`_.
you can use the advanced string formatting described in :pep:`3101`.

Third-party applications for use with Django are, of course, free to set their
own version requirements.
@@ -63,8 +62,6 @@ improvements and optimizations to the Python language since version 2.5, and
will help ease the process of dropping support for older Python versions on
the road to Python 3.

.. _PEP 3101: http://www.python.org/dev/peps/pep-3101/

Can I use Django with Python 2.4?
---------------------------------

+4 −13
Original line number Diff line number Diff line
@@ -43,19 +43,10 @@ Glossary

    property
        Also known as "managed attributes", and a feature of Python since
        version 2.2. From `the property documentation`__:

            Properties are a neat way to implement attributes whose usage
            resembles attribute access, but whose implementation uses method
            calls. [...] You
            could only do this by overriding ``__getattr__`` and
            ``__setattr__``; but overriding ``__setattr__`` slows down all
            attribute assignments considerably, and overriding ``__getattr__``
            is always a bit tricky to get right. Properties let you do this
            painlessly, without having to override ``__getattr__`` or
            ``__setattr__``.

        __ http://www.python.org/download/releases/2.2/descrintro/#property
        version 2.2. This is a neat way to implement attributes whose usage
        resembles attribute access, but whose implementation uses method calls.

        See :func:`property`.

    queryset
        An object representing some set of rows to be fetched from the database.
+2 −4
Original line number Diff line number Diff line
@@ -335,15 +335,13 @@ responsible for returning a ``Node`` instance based on the contents of the tag.

For example, let's write a template tag, ``{% current_time %}``, that displays
the current date/time, formatted according to a parameter given in the tag, in
`strftime syntax`_. It's a good idea to decide the tag syntax before anything
else. In our case, let's say the tag should be used like this:
:func:`~time.strftime` syntax. It's a good idea to decide the tag syntax before
anything else. In our case, let's say the tag should be used like this:

.. code-block:: html+django

    <p>The time is {% current_time "%Y-%m-%d %I:%M %p" %}.</p>

.. _`strftime syntax`: http://docs.python.org/library/time.html#time.strftime

The parser for this function should grab the parameter and create a ``Node``
object::

+2 −4
Original line number Diff line number Diff line
@@ -9,10 +9,8 @@ Django into production.
.. _mod_wsgi: http://code.google.com/p/modwsgi/

mod_wsgi is an Apache module which can be used to host any Python application
which supports the `Python WSGI interface`_, including Django. Django will work
with any version of Apache which supports mod_wsgi.

.. _python wsgi interface: http://www.python.org/dev/peps/pep-0333/
which supports the Python WSGI interface described in :pep:`3333`, including
Django. Django will work with any version of Apache which supports mod_wsgi.

The `official mod_wsgi documentation`_ is fantastic; it's your source for all
the details about how to use mod_wsgi. You'll probably want to start with the
Loading