mirror of
https://github.com/django/django.git
synced 2025-07-24 13:44:32 +00:00
Fixed broken links, round 3. refs #19516
This commit is contained in:
parent
e2ec7b47b3
commit
b3a8c9dab8
34 changed files with 127 additions and 118 deletions
|
@ -284,7 +284,7 @@ Manager functions
|
|||
.. versionchanged:: 1.4
|
||||
The ``email`` parameter was made optional. The username
|
||||
parameter is now checked for emptiness and raises a
|
||||
:exc:`ValueError` in case of a negative result.
|
||||
:exc:`~exceptions.ValueError` in case of a negative result.
|
||||
|
||||
Creates, saves and returns a :class:`~django.contrib.auth.models.User`.
|
||||
|
||||
|
@ -558,7 +558,7 @@ Anonymous users
|
|||
:meth:`~django.contrib.auth.models.User.delete()`,
|
||||
:meth:`~django.contrib.auth.models.User.set_groups()` and
|
||||
:meth:`~django.contrib.auth.models.User.set_permissions()` raise
|
||||
:exc:`NotImplementedError`.
|
||||
:exc:`~exceptions.NotImplementedError`.
|
||||
|
||||
In practice, you probably won't need to use
|
||||
:class:`~django.contrib.auth.models.AnonymousUser` objects on your own, but
|
||||
|
|
|
@ -327,8 +327,8 @@ a primary key of 1, Django will raise ``Entry.DoesNotExist``.
|
|||
|
||||
Similarly, Django will complain if more than one item matches the
|
||||
:meth:`~django.db.models.query.QuerySet.get` query. In this case, it will raise
|
||||
``MultipleObjectsReturned``, which again is an attribute of the model class
|
||||
itself.
|
||||
:exc:`~django.core.exceptions.MultipleObjectsReturned`, which again is an
|
||||
attribute of the model class itself.
|
||||
|
||||
|
||||
Other QuerySet methods
|
||||
|
|
|
@ -456,8 +456,9 @@ zone support.
|
|||
|
||||
Fixtures generated with ``USE_TZ = False``, or before Django 1.4, use the
|
||||
"naive" format. If your project contains such fixtures, after you enable time
|
||||
zone support, you'll see :exc:`RuntimeWarning`\ s when you load them. To get
|
||||
rid of the warnings, you must convert your fixtures to the "aware" format.
|
||||
zone support, you'll see :exc:`~exceptions.RuntimeWarning`\ s when you load
|
||||
them. To get rid of the warnings, you must convert your fixtures to the "aware"
|
||||
format.
|
||||
|
||||
You can regenerate fixtures with :djadmin:`loaddata` then :djadmin:`dumpdata`.
|
||||
Or, if they're small enough, you can simply edit them to add the UTC offset
|
||||
|
|
|
@ -928,7 +928,7 @@ function. Example::
|
|||
|
||||
:func:`~django.conf.urls.i18n.i18n_patterns` is only allowed in your root
|
||||
URLconf. Using it within an included URLconf will throw an
|
||||
:exc:`ImproperlyConfigured` exception.
|
||||
:exc:`~django.core.exceptions.ImproperlyConfigured` exception.
|
||||
|
||||
.. warning::
|
||||
|
||||
|
|
|
@ -343,7 +343,7 @@ meaning of ``str`` changed. To test these types, use the following idioms::
|
|||
isinstance(myvalue, bytes) # replacement for str
|
||||
|
||||
Python ≥ 2.6 provides ``bytes`` as an alias for ``str``, so you don't need
|
||||
:attr:`six.binary_type`.
|
||||
:data:`six.binary_type`.
|
||||
|
||||
``long``
|
||||
~~~~~~~~
|
||||
|
@ -356,7 +356,7 @@ The ``long`` type no longer exists in Python 3. ``1L`` is a syntax error. Use
|
|||
``xrange``
|
||||
~~~~~~~~~~
|
||||
|
||||
Import :func:`six.moves.xrange` wherever you use ``xrange``.
|
||||
Import ``six.moves.xrange`` wherever you use ``xrange``.
|
||||
|
||||
Moved modules
|
||||
~~~~~~~~~~~~~
|
||||
|
|
|
@ -38,7 +38,7 @@ in unauthorized JavaScript execution, depending on how the browser renders
|
|||
imperfect HTML.
|
||||
|
||||
It is also important to be particularly careful when using ``is_safe`` with
|
||||
custom template tags, the :ttag:`safe` template tag, :mod:`mark_safe
|
||||
custom template tags, the :tfilter:`safe` template tag, :mod:`mark_safe
|
||||
<django.utils.safestring>`, and when autoescape is turned off.
|
||||
|
||||
In addition, if you are using the template system to output something other
|
||||
|
@ -76,8 +76,8 @@ POST to your Web site and have another logged in user unwittingly submit that
|
|||
form. The malicious user would have to know the nonce, which is user specific
|
||||
(using a cookie).
|
||||
|
||||
When deployed with :ref:`HTTPS <security-recommendation-ssl>`,
|
||||
``CsrfViewMiddleware`` will check that the HTTP referer header is set to a
|
||||
When deployed with :ref:`HTTPS <security-recommendation-ssl>`,
|
||||
``CsrfViewMiddleware`` will check that the HTTP referer header is set to a
|
||||
URL on the same origin (including subdomain and port). Because HTTPS
|
||||
provides additional security, it is imperative to ensure connections use HTTPS
|
||||
where it is available by forwarding insecure connection requests and using
|
||||
|
|
|
@ -193,7 +193,7 @@ This strategy works well for most objects, but it can cause difficulty in some
|
|||
circumstances.
|
||||
|
||||
Consider the case of a list of objects that have a foreign key referencing
|
||||
:class:`~django.contrib.conttenttypes.models.ContentType`. If you're going to
|
||||
:class:`~django.contrib.contenttypes.models.ContentType`. If you're going to
|
||||
serialize an object that refers to a content type, then you need to have a way
|
||||
to refer to that content type to begin with. Since ``ContentType`` objects are
|
||||
automatically created by Django during the database synchronization process,
|
||||
|
|
|
@ -30,7 +30,7 @@ notifications:
|
|||
|
||||
* :data:`django.db.models.signals.m2m_changed`
|
||||
|
||||
Sent when a :class:`ManyToManyField` on a model is changed.
|
||||
Sent when a :class:`~django.db.models.ManyToManyField` on a model is changed.
|
||||
|
||||
* :data:`django.core.signals.request_started` &
|
||||
:data:`django.core.signals.request_finished`
|
||||
|
|
|
@ -38,7 +38,7 @@ frameworks are:
|
|||
|
||||
* **Unit tests** -- tests that are expressed as methods on a Python class
|
||||
that subclasses :class:`unittest.TestCase` or Django's customized
|
||||
:class:`TestCase`. For example::
|
||||
:class:`~django.test.TestCase`. For example::
|
||||
|
||||
import unittest
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue