summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2014-04-26 16:00:15 +0200
committerClaude Paroz <claude@2xlibre.net>2014-04-26 16:03:40 +0200
commite441cebce340f54741be957817cc034000deab3c (patch)
tree0a1b9730a86f6a3660961e220cd099494f9fd8f2 /docs/ref
parentabd68b5affaec35e941b49f1b0a4cb8d70c22d7b (diff)
[1.7.x] Updated doc links to point to Python 3 documentation
Backport of 680a0f08b from master.
Diffstat (limited to 'docs/ref')
-rw-r--r--docs/ref/applications.txt14
-rw-r--r--docs/ref/contrib/auth.txt3
-rw-r--r--docs/ref/contrib/sites.txt2
-rw-r--r--docs/ref/exceptions.txt3
-rw-r--r--docs/ref/files/file.txt7
-rw-r--r--docs/ref/request-response.txt8
-rw-r--r--docs/ref/templates/builtins.txt2
-rw-r--r--docs/ref/utils.txt8
-rw-r--r--docs/ref/validators.txt4
9 files changed, 25 insertions, 26 deletions
diff --git a/docs/ref/applications.txt b/docs/ref/applications.txt
index 3137073fa0..6e6e086607 100644
--- a/docs/ref/applications.txt
+++ b/docs/ref/applications.txt
@@ -209,8 +209,8 @@ Methods
.. method:: AppConfig.get_model(model_name)
Returns the :class:`~django.db.models.Model` with the given
- ``model_name``. Raises :exc:`~exceptions.LookupError` if no such model
- exists. ``model_name`` is case-insensitive.
+ ``model_name``. Raises :exc:`LookupError` if no such model exists.
+ ``model_name`` is case-insensitive.
.. method:: AppConfig.ready()
@@ -284,8 +284,8 @@ Application registry
.. method:: apps.get_app_config(app_label)
Returns an :class:`~django.apps.AppConfig` for the application with the
- given ``app_label``. Raises :exc:`~exceptions.LookupError` if no such
- application exists.
+ given ``app_label``. Raises :exc:`LookupError` if no such application
+ exists.
.. method:: apps.is_installed(app_name)
@@ -303,9 +303,9 @@ Application registry
argument in the form ``app_label.model_name``. ``model_name`` is case-
insensitive.
- Raises :exc:`~exceptions.LookupError` if no such application or model
- exists. Raises :exc:`~exceptions.ValueError` when called with a single
- argument that doesn't contain exactly one dot.
+ Raises :exc:`LookupError` if no such application or model exists. Raises
+ :exc:`ValueError` when called with a single argument that doesn't contain
+ exactly one dot.
.. _applications-troubleshooting:
diff --git a/docs/ref/contrib/auth.txt b/docs/ref/contrib/auth.txt
index 0f1a493a28..da9c69acdf 100644
--- a/docs/ref/contrib/auth.txt
+++ b/docs/ref/contrib/auth.txt
@@ -290,8 +290,7 @@ Anonymous users
* :meth:`~django.contrib.auth.models.User.set_password()`,
:meth:`~django.contrib.auth.models.User.check_password()`,
:meth:`~django.db.models.Model.save` and
- :meth:`~django.db.models.Model.delete()` raise
- :exc:`~exceptions.NotImplementedError`.
+ :meth:`~django.db.models.Model.delete()` raise :exc:`NotImplementedError`.
In practice, you probably won't need to use
:class:`~django.contrib.auth.models.AnonymousUser` objects on your own, but
diff --git a/docs/ref/contrib/sites.txt b/docs/ref/contrib/sites.txt
index 57684ed420..a5f9786e76 100644
--- a/docs/ref/contrib/sites.txt
+++ b/docs/ref/contrib/sites.txt
@@ -478,7 +478,7 @@ method takes an :class:`~django.http.HttpRequest` object. It's able to deduce
the ``domain`` and ``name`` by looking at the request's domain. It has
``save()`` and ``delete()`` methods to match the interface of
:class:`~django.contrib.sites.models.Site`, but the methods raise
-:exc:`~exceptions.NotImplementedError`..
+:exc:`NotImplementedError`.
``get_current_site`` shortcut
=============================
diff --git a/docs/ref/exceptions.txt b/docs/ref/exceptions.txt
index 18b77fdd71..ad83cdf1e9 100644
--- a/docs/ref/exceptions.txt
+++ b/docs/ref/exceptions.txt
@@ -225,5 +225,4 @@ Python Exceptions
=================
Django raises built-in Python exceptions when appropriate as well. See the
-Python documentation for further information on the
-built-in :mod:`exceptions`.
+Python documentation for further information on the :ref:`bltin-exceptions`.
diff --git a/docs/ref/files/file.txt b/docs/ref/files/file.txt
index c2208baa47..6874936eab 100644
--- a/docs/ref/files/file.txt
+++ b/docs/ref/files/file.txt
@@ -11,8 +11,8 @@ The ``File`` Class
.. class:: File(file_object)
- The :class:`File` class is a thin wrapper around Python's :py:ref:`built-in
- file object<bltin-file-objects>` with some Django-specific additions.
+ The :class:`File` class is a thin wrapper around a Python
+ :py:term:`file object` with some Django-specific additions.
Internally, Django uses this class when it needs to represent a file.
:class:`File` objects have the following attributes and methods:
@@ -28,8 +28,7 @@ The ``File`` Class
.. attribute:: file
- The underlying :py:ref:`built-in file object<bltin-file-objects>` that
- this class wraps.
+ The underlying :py:term:`file object` that this class wraps.
.. attribute:: mode
diff --git a/docs/ref/request-response.txt b/docs/ref/request-response.txt
index e85223d993..939f39a1a3 100644
--- a/docs/ref/request-response.txt
+++ b/docs/ref/request-response.txt
@@ -666,8 +666,8 @@ Methods
.. method:: HttpResponse.set_cookie(key, value='', max_age=None, expires=None, path='/', domain=None, secure=None, httponly=False)
- Sets a cookie. The parameters are the same as in the :class:`Cookie.Morsel`
- object in the Python standard library.
+ Sets a cookie. The parameters are the same as in the
+ :class:`~http.cookies.Morsel` cookie object in the Python standard library.
* ``max_age`` should be a number of seconds, or ``None`` (default) if
the cookie should last only as long as the client's browser session.
@@ -828,7 +828,7 @@ JsonResponse objects
The ``safe`` boolean parameter defaults to ``True``. If it's set to ``False``,
any object can be passed for serialization (otherwise only ``dict`` instances
are allowed). If ``safe`` is ``True`` and a non-``dict`` object is passed as
- the first argument, a :exc:`~exceptions.TypeError` will be raised.
+ the first argument, a :exc:`TypeError` will be raised.
Usage
-----
@@ -849,7 +849,7 @@ parameter to ``False``::
>>> response = JsonResponse([1, 2, 3], safe=False)
-Without passing ``safe=False``, a :exc:`~exceptions.TypeError` will be raised.
+Without passing ``safe=False``, a :exc:`TypeError` will be raised.
.. warning::
diff --git a/docs/ref/templates/builtins.txt b/docs/ref/templates/builtins.txt
index f77c2812cb..ca44da3bda 100644
--- a/docs/ref/templates/builtins.txt
+++ b/docs/ref/templates/builtins.txt
@@ -2532,7 +2532,7 @@ slightly different call:
The :mod:`staticfiles<django.contrib.staticfiles>` contrib app also ships
with a :ttag:`static template tag<staticfiles-static>` which uses
``staticfiles'`` :setting:`STATICFILES_STORAGE` to build the URL of the
- given path (rather than simply using :func:`urlparse.urljoin` with the
+ given path (rather than simply using :func:`urllib.parse.urljoin` with the
:setting:`STATIC_URL` setting and the given path). Use that instead if you
have an advanced use case such as :ref:`using a cloud service to serve
static files<staticfiles-from-cdn>`::
diff --git a/docs/ref/utils.txt b/docs/ref/utils.txt
index 056f851003..1c0a1b6368 100644
--- a/docs/ref/utils.txt
+++ b/docs/ref/utils.txt
@@ -133,8 +133,8 @@ results. Instead do::
The functions defined in this module share the following properties:
-- They raise :exc:`~exceptions.ValueError` if their input is well formatted but
- isn't a valid date or time.
+- They raise :exc:`ValueError` if their input is well formatted but isn't a
+ valid date or time.
- They return ``None`` if it isn't well formatted at all.
- They accept up to picosecond resolution in input, but they truncate it to
microseconds, since that's what Python supports.
@@ -692,7 +692,9 @@ escaping HTML.
.. function:: int_to_base36(i)
Converts a positive integer to a base 36 string. On Python 2 ``i`` must be
- smaller than :data:`sys.maxint`.
+ smaller than `sys.maxint`_.
+
+ .. _sys.maxint: http://docs.python.org/2/library/sys.html#sys.maxint
.. function:: urlsafe_base64_encode(s)
diff --git a/docs/ref/validators.txt b/docs/ref/validators.txt
index eb2e1d0d02..5d8769f950 100644
--- a/docs/ref/validators.txt
+++ b/docs/ref/validators.txt
@@ -68,7 +68,7 @@ to, or in lieu of custom ``field.clean()`` methods.
:param inverse_match: If not ``None``, overrides :attr:`inverse_match`.
:param flags: If not ``None``, overrides :attr:`flags`. In that case,
:attr:`regex` must be a regular expression string, or
- :exc:`~exceptions.TypeError` is raised.
+ :exc:`TypeError` is raised.
.. attribute:: regex
@@ -102,7 +102,7 @@ to, or in lieu of custom ``field.clean()`` methods.
The flags used when compiling the regular expression string :attr:`regex`.
If :attr:`regex` is a pre-compiled regular expression, and :attr:`flags` is overridden,
- :exc:`~exceptions.TypeError` is raised.
+ :exc:`TypeError` is raised.
Defaults to `0`.
``URLValidator``