Skip to content

Commit

Permalink
[1.5.X] Fixed broken links, round 3. refs #19516
Browse files Browse the repository at this point in the history
Backport of b3a8c9d from master
  • Loading branch information
timgraham committed Dec 27, 2012
1 parent e2396bf commit fbc06ee
Show file tree
Hide file tree
Showing 34 changed files with 127 additions and 118 deletions.
1 change: 1 addition & 0 deletions docs/conf.py
Expand Up @@ -95,6 +95,7 @@
'python': ('http://docs.python.org/2.7', None),
'sphinx': ('http://sphinx.pocoo.org/', None),
'six': ('http://packages.python.org/six/', None),
'simplejson': ('http://simplejson.readthedocs.org/en/latest/', None),
}

# Python's docs don't change every week.
Expand Down
20 changes: 10 additions & 10 deletions docs/howto/error-reporting.txt
Expand Up @@ -123,7 +123,7 @@ Error reports are really helpful for debugging errors, so it is generally
useful to record as much relevant information about those errors as possible.
For example, by default Django records the `full traceback`_ for the
exception raised, each `traceback frame`_'s local variables, and the
:class:`HttpRequest`'s :ref:`attributes<httprequest-attributes>`.
:class:`~django.http.HttpRequest`'s :ref:`attributes<httprequest-attributes>`.

However, sometimes certain types of information may be too sensitive and thus
may not be appropriate to be kept track of, for example a user's password or
Expand Down Expand Up @@ -165,11 +165,11 @@ production environment (that is, where :setting:`DEBUG` is set to ``False``):

.. function:: sensitive_post_parameters(*parameters)

If one of your views receives an :class:`HttpRequest` object with
:attr:`POST parameters<HttpRequest.POST>` susceptible to contain sensitive
information, you may prevent the values of those parameters from being
included in the error reports using the ``sensitive_post_parameters``
decorator::
If one of your views receives an :class:`~django.http.HttpRequest` object
with :attr:`POST parameters<django.http.HttpRequest.POST>` susceptible to
contain sensitive information, you may prevent the values of those
parameters from being included in the error reports using the
``sensitive_post_parameters`` decorator::

from django.views.decorators.debug import sensitive_post_parameters

Expand Down Expand Up @@ -198,10 +198,10 @@ production environment (that is, where :setting:`DEBUG` is set to ``False``):
.. versionchanged:: 1.4

Since version 1.4, all POST parameters are systematically filtered out of
error reports for certain :mod:`contrib.views.auth` views (``login``,
``password_reset_confirm``, ``password_change``, and ``add_view`` and
``user_change_password`` in the ``auth`` admin) to prevent the leaking of
sensitive information such as user passwords.
error reports for certain :mod:`django.contrib.auth.views` views (
``login``, ``password_reset_confirm``, ``password_change``, and
``add_view`` and ``user_change_password`` in the ``auth`` admin) to prevent
the leaking of sensitive information such as user passwords.

.. _custom-error-reports:

Expand Down
6 changes: 3 additions & 3 deletions docs/intro/tutorial02.txt
Expand Up @@ -398,9 +398,9 @@ That adds a "Filter" sidebar that lets people filter the change list by the
:alt: Polls change list page, updated

The type of filter displayed depends on the type of field you're filtering on.
Because ``pub_date`` is a :class:`~django.db.models.fields.DateTimeField`,
Django knows to give appropriate filter options: "Any date," "Today," "Past 7
days," "This month," "This year."
Because ``pub_date`` is a :class:`~django.db.models.DateTimeField`, Django
knows to give appropriate filter options: "Any date," "Today," "Past 7 days,"
"This month," "This year."

This is shaping up well. Let's add some search capability::

Expand Down
7 changes: 4 additions & 3 deletions docs/intro/tutorial04.txt
Expand Up @@ -98,9 +98,10 @@ This code includes a few things we haven't covered yet in this tutorial:
<django.http.HttpRequest.POST>` in our code, to ensure that data is only
altered via a POST call.

* ``request.POST['choice']`` will raise :exc:`KeyError` if ``choice`` wasn't
provided in POST data. The above code checks for :exc:`KeyError` and
redisplays the poll form with an error message if ``choice`` isn't given.
* ``request.POST['choice']`` will raise :exc:`~exceptions.KeyError` if
``choice`` wasn't provided in POST data. The above code checks for
:exc:`~exceptions.KeyError` and redisplays the poll form with an error
message if ``choice`` isn't given.

* After incrementing the choice count, the code returns an
:class:`~django.http.HttpResponseRedirect` rather than a normal
Expand Down
5 changes: 2 additions & 3 deletions docs/ref/contrib/comments/models.txt
Expand Up @@ -11,12 +11,12 @@ The built-in comment models

.. attribute:: content_object

A :class:`~django.contrib.contettypes.generic.GenericForeignKey`
A :class:`~django.contrib.contenttypes.generic.GenericForeignKey`
attribute pointing to the object the comment is attached to. You can use
this to get at the related object (i.e. ``my_comment.content_object``).

Since this field is a
:class:`~django.contrib.contettypes.generic.GenericForeignKey`, it's
:class:`~django.contrib.contenttypes.generic.GenericForeignKey`, it's
actually syntactic sugar on top of two underlying attributes, described
below.

Expand Down Expand Up @@ -77,4 +77,3 @@ The built-in comment models

``True`` if the comment was removed. Used to keep track of removed
comments instead of just deleting them.

6 changes: 3 additions & 3 deletions docs/ref/contrib/comments/moderation.txt
Expand Up @@ -81,8 +81,8 @@ Built-in moderation options
.. attribute:: auto_close_field

If this is set to the name of a
:class:`~django.db.models.fields.DateField` or
:class:`~django.db.models.fields.DateTimeField` on the model for which
:class:`~django.db.models.DateField` or
:class:`~django.db.models.DateTimeField` on the model for which
comments are being moderated, new comments for objects of that model
will be disallowed (immediately deleted) when a certain number of days
have passed after the date specified in that field. Must be
Expand Down Expand Up @@ -117,7 +117,7 @@ Built-in moderation options
.. attribute:: enable_field

If this is set to the name of a
:class:`~django.db.models.fields.BooleanField` on the model
:class:`~django.db.models.BooleanField` on the model
for which comments are being moderated, new comments on
objects of that model will be disallowed (immediately deleted)
whenever the value of that field is ``False`` on the object
Expand Down
14 changes: 8 additions & 6 deletions docs/ref/contrib/contenttypes.txt
Expand Up @@ -234,13 +234,15 @@ lookup::

.. versionadded:: 1.5

Prior to Django 1.5 :meth:`~ContentTypeManager.get_for_model()` and
:meth:`~ContentTypeManager.get_for_models()` always returned the
:class:`~django.contrib.contenttypes.models.ContentType` associated with the
concrete model of the specified one(s). That means there was no way to retreive
the :class:`~django.contrib.contenttypes.models.ContentType` of a proxy model
Prior to Django 1.5,
:meth:`~django.contrib.contenttypes.models.ContentTypeManager.get_for_model` and
:meth:`~django.contrib.contenttypes.models.ContentTypeManager.get_for_models`
always returned the :class:`~django.contrib.contenttypes.models.ContentType`
associated with the concrete model of the specified one(s). That means there
was no way to retreive the
:class:`~django.contrib.contenttypes.models.ContentType` of a proxy model
using those methods. As of Django 1.5 you can now pass a boolean flag –
respectively ``for_concrete_model`` and ``for_concrete_models`` – to specify
``for_concrete_model`` and ``for_concrete_models`` respectively – to specify
wether or not you want to retreive the
:class:`~django.contrib.contenttypes.models.ContentType` for the concrete or
direct model.
Expand Down
10 changes: 5 additions & 5 deletions docs/ref/forms/api.txt
Expand Up @@ -150,11 +150,11 @@ it's not necessary to include every field in your form. For example::
These values are only displayed for unbound forms, and they're not used as
fallback values if a particular value isn't provided.

Note that if a :class:`~django.forms.fields.Field` defines
:attr:`~Form.initial` *and* you include ``initial`` when instantiating the
``Form``, then the latter ``initial`` will have precedence. In this example,
``initial`` is provided both at the field level and at the form instance level,
and the latter gets precedence::
Note that if a :class:`~django.forms.Field` defines :attr:`~Form.initial` *and*
you include ``initial`` when instantiating the ``Form``, then the latter
``initial`` will have precedence. In this example, ``initial`` is provided both
at the field level and at the form instance level, and the latter gets
precedence::

>>> class CommentForm(forms.Form):
... name = forms.CharField(initial='class')
Expand Down
2 changes: 1 addition & 1 deletion docs/ref/forms/fields.txt
Expand Up @@ -885,7 +885,7 @@ Slightly complex built-in ``Field`` classes
.. attribute:: MultiValueField.widget

Must be a subclass of :class:`django.forms.MultiWidget`.
Default value is :class:`~django.forms.widgets.TextInput`, which
Default value is :class:`~django.forms.TextInput`, which
probably is not very useful in this case.

.. method:: compress(data_list)
Expand Down
10 changes: 5 additions & 5 deletions docs/ref/forms/widgets.txt
Expand Up @@ -49,8 +49,8 @@ Setting arguments for widgets

Many widgets have optional extra arguments; they can be set when defining the
widget on the field. In the following example, the
:attr:`~SelectDateWidget.years` attribute is set for a
:class:`~django.forms.extras.widgets.SelectDateWidget`::
:attr:`~django.forms.extras.widgets.SelectDateWidget.years` attribute is set
for a :class:`~django.forms.extras.widgets.SelectDateWidget`::

from django.forms.fields import DateField, ChoiceField, MultipleChoiceField
from django.forms.widgets import RadioSelect, CheckboxSelectMultiple
Expand Down Expand Up @@ -222,7 +222,7 @@ foundation for custom widgets.
.. class:: MultiWidget(widgets, attrs=None)

A widget that is composed of multiple widgets.
:class:`~django.forms.widgets.MultiWidget` works hand in hand with the
:class:`~django.forms.MultiWidget` works hand in hand with the
:class:`~django.forms.MultiValueField`.

:class:`MultiWidget` has one required argument:
Expand All @@ -246,8 +246,8 @@ foundation for custom widgets.
the combined value of the form field into the values for each widget.

An example of this is how :class:`SplitDateTimeWidget` turns a
:class:`datetime` value into a list with date and time split into two
separate values::
:class:`~datetime.datetime` value into a list with date and time split
into two separate values::

class SplitDateTimeWidget(MultiWidget):

Expand Down
5 changes: 2 additions & 3 deletions docs/ref/models/fields.txt
Expand Up @@ -547,8 +547,7 @@ Also has one optional argument:
Optional. A storage object, which handles the storage and retrieval of your
files. See :doc:`/topics/files` for details on how to provide this object.

The default form widget for this field is a
:class:`~django.forms.widgets.FileInput`.
The default form widget for this field is a :class:`~django.forms.FileInput`.

Using a :class:`FileField` or an :class:`ImageField` (see below) in a model
takes a few steps:
Expand Down Expand Up @@ -590,7 +589,7 @@ topic guide.
saved.

The uploaded file's relative URL can be obtained using the
:attr:`~django.db.models.fields.FileField.url` attribute. Internally,
:attr:`~django.db.models.FileField.url` attribute. Internally,
this calls the :meth:`~django.core.files.storage.Storage.url` method of the
underlying :class:`~django.core.files.storage.Storage` class.

Expand Down
2 changes: 1 addition & 1 deletion docs/ref/models/instances.txt
Expand Up @@ -659,7 +659,7 @@ For every :class:`~django.db.models.DateField` and
<django.db.models.Field.null>`, the object will have ``get_next_by_FOO()`` and
``get_previous_by_FOO()`` methods, where ``FOO`` is the name of the field. This
returns the next and previous object with respect to the date field, raising
a :exc:`~django.db.DoesNotExist` exception when appropriate.
a :exc:`~django.core.exceptions.DoesNotExist` exception when appropriate.

Both methods accept optional keyword arguments, which should be in the format
described in :ref:`Field lookups <field-lookups>`.
Expand Down
14 changes: 7 additions & 7 deletions docs/ref/models/querysets.txt
Expand Up @@ -1112,9 +1112,9 @@ one, doing so will result in an error.

.. note::

When calling :meth:`~Model.save()` for instances with deferred fields,
only the loaded fields will be saved. See :meth:`~Model.save()` for more
details.
When calling :meth:`~django.db.models.Model.save()` for instances with
deferred fields, only the loaded fields will be saved. See
:meth:`~django.db.models.Model.save()` for more details.


only
Expand Down Expand Up @@ -1164,9 +1164,9 @@ using :meth:`select_related` is an error as well.

.. note::

When calling :meth:`~Model.save()` for instances with deferred fields,
only the loaded fields will be saved. See :meth:`~Model.save()` for more
details.
When calling :meth:`~django.db.models.Model.save()` for instances with
deferred fields, only the loaded fields will be saved. See
:meth:`~django.db.models.Model.save()` for more details.

using
~~~~~
Expand Down Expand Up @@ -1248,7 +1248,7 @@ the format described in `Field lookups`_.

``get()`` raises :exc:`~django.core.exceptions.MultipleObjectsReturned` if more
than one object was found. The
:exc:`~django.core.excpetions.MultipleObjectsReturned` exception is an
:exc:`~django.core.exceptions.MultipleObjectsReturned` exception is an
attribute of the model class.

``get()`` raises a :exc:`~django.core.exceptions.DoesNotExist` exception if an
Expand Down
28 changes: 15 additions & 13 deletions docs/ref/signals.txt
Expand Up @@ -212,24 +212,24 @@ m2m_changed
.. data:: django.db.models.signals.m2m_changed
:module:

Sent when a :class:`ManyToManyField` is changed on a model instance.
Strictly speaking, this is not a model signal since it is sent by the
:class:`ManyToManyField`, but since it complements the
Sent when a :class:`~django.db.models.ManyToManyField` is changed on a model
instance. Strictly speaking, this is not a model signal since it is sent by the
:class:`~django.db.models.ManyToManyField`, but since it complements the
:data:`pre_save`/:data:`post_save` and :data:`pre_delete`/:data:`post_delete`
when it comes to tracking changes to models, it is included here.

Arguments sent with this signal:

``sender``
The intermediate model class describing the :class:`ManyToManyField`.
This class is automatically created when a many-to-many field is
defined; you can access it using the ``through`` attribute on the
many-to-many field.
The intermediate model class describing the
:class:`~django.db.models.ManyToManyField`. This class is automatically
created when a many-to-many field is defined; you can access it using the
``through`` attribute on the many-to-many field.

``instance``
The instance whose many-to-many relation is updated. This can be an
instance of the ``sender``, or of the class the :class:`ManyToManyField`
is related to.
instance of the ``sender``, or of the class the
:class:`~django.db.models.ManyToManyField` is related to.

``action``
A string indicating the type of update that is done on the relation.
Expand Down Expand Up @@ -303,8 +303,9 @@ Argument Value

``action`` ``"pre_add"`` (followed by a separate signal with ``"post_add"``)

``reverse`` ``False`` (``Pizza`` contains the :class:`ManyToManyField`,
so this call modifies the forward relation)
``reverse`` ``False`` (``Pizza`` contains the
:class:`~django.db.models.ManyToManyField`, so this call
modifies the forward relation)

``model`` ``Topping`` (the class of the objects added to the
``Pizza``)
Expand All @@ -329,8 +330,9 @@ Argument Value

``action`` ``"pre_remove"`` (followed by a separate signal with ``"post_remove"``)

``reverse`` ``True`` (``Pizza`` contains the :class:`ManyToManyField`,
so this call modifies the reverse relation)
``reverse`` ``True`` (``Pizza`` contains the
:class:`~django.db.models.ManyToManyField`, so this call
modifies the reverse relation)

``model`` ``Pizza`` (the class of the objects removed from the
``Topping``)
Expand Down
2 changes: 1 addition & 1 deletion docs/ref/templates/builtins.txt
Expand Up @@ -857,7 +857,7 @@ an attribute "description," you could use::
{% regroup cities by country.description as country_list %}

Or, if ``country`` is a field with ``choices``, it will have a
:meth:`^django.db.models.Model.get_FOO_display` method available as an
:meth:`~django.db.models.Model.get_FOO_display` method available as an
attribute, allowing you to group on the display string rather than the
``choices`` key::

Expand Down
4 changes: 2 additions & 2 deletions docs/ref/utils.txt
Expand Up @@ -145,8 +145,8 @@ results. Instead do::

The functions defined in this module share the following properties:

- They raise :exc:`ValueError` if their input is well formatted but isn't a
valid date or time.
- They raise :exc:`~exceptions.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.
Expand Down
11 changes: 6 additions & 5 deletions docs/releases/1.0-porting-guide.txt
Expand Up @@ -439,9 +439,10 @@ Settings
Better exceptions
~~~~~~~~~~~~~~~~~

The old :exc:`EnvironmentError` has split into an :exc:`ImportError` when
Django fails to find the settings module and a :exc:`RuntimeError` when you try
to reconfigure settings after having already used them
The old :exc:`~exceptions.EnvironmentError` has split into an
:exc:`~exceptions.ImportError` when Django fails to find the settings module
and a :exc:`~exceptions.RuntimeError` when you try to reconfigure settings
after having already used them.

:setting:`LOGIN_URL` has moved
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -476,8 +477,8 @@ Smaller model changes
Different exception from ``get()``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Managers now return a :exc:`MultipleObjectsReturned` exception
instead of :exc:`AssertionError`:
Managers now return a :exc:`~django.core.exceptions.MultipleObjectsReturned`
exception instead of :exc:`~exceptions.AssertionError`:

Old (0.96)::

Expand Down
2 changes: 1 addition & 1 deletion docs/releases/1.1.txt
Expand Up @@ -132,7 +132,7 @@ public methods.
Fixed the ``join`` filter's escaping behavior
---------------------------------------------

The :ttag:`join` filter no longer escapes the literal value that is
The :tfilter:`join` filter no longer escapes the literal value that is
passed in for the connector.

This is backwards incompatible for the special situation of the literal string
Expand Down
2 changes: 1 addition & 1 deletion docs/releases/1.3-alpha-1.txt
Expand Up @@ -156,7 +156,7 @@ requests. These include:
requests in tests.

* A new test assertion --
:meth:`~django.test.client.Client.assertNumQueries` -- making it
:meth:`~django.test.TestCase.assertNumQueries` -- making it
easier to test the database activity associated with a view.


Expand Down
4 changes: 2 additions & 2 deletions docs/releases/1.4-alpha-1.txt
Expand Up @@ -357,8 +357,8 @@ Extended IPv6 support

The previously added support for IPv6 addresses when using the runserver
management command in Django 1.3 has now been further extended by adding
a :class:`~django.db.models.fields.GenericIPAddressField` model field,
a :class:`~django.forms.fields.GenericIPAddressField` form field and
a :class:`~django.db.models.GenericIPAddressField` model field,
a :class:`~django.forms.GenericIPAddressField` form field and
the validators :data:`~django.core.validators.validate_ipv46_address` and
:data:`~django.core.validators.validate_ipv6_address`

Expand Down

0 comments on commit fbc06ee

Please sign in to comment.