summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2009-03-24 12:12:32 +0000
committerRussell Keith-Magee <russell@keith-magee.com>2009-03-24 12:12:32 +0000
commit1c670a70530099ec61e78dabae5744512189f168 (patch)
treec7a062bff650c59b4465db2369c6fe2dd7a72b86 /docs/ref
parent17401448b21e5980437e24ac3f12c84e267c580f (diff)
[1.0.X] Fixed #10329 -- Added link target for get_FOO_display, get_next_by_FOO, and get_previous_by_FOO. Thanks to rctay for the report, and timo for the patch.
Merge of r10152 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10160 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/ref')
-rw-r--r--docs/ref/models/fields.txt2
-rw-r--r--docs/ref/models/instances.txt9
2 files changed, 5 insertions, 6 deletions
diff --git a/docs/ref/models/fields.txt b/docs/ref/models/fields.txt
index 4643837841..2c70e58ff2 100644
--- a/docs/ref/models/fields.txt
+++ b/docs/ref/models/fields.txt
@@ -724,7 +724,7 @@ A :class:`CharField` for a URL. Has one extra optional argument:
The admin represents this as an ``<input type="text">`` (a single-line input).
-Like all ::class:`CharField` subclasses, :class:`URLField` takes the optional
+Like all :class:`CharField` subclasses, :class:`URLField` takes the optional
:attr:`~CharField.max_length`argument. If you don't specify
:attr:`~CharField.max_length`, a default of 200 is used.
diff --git a/docs/ref/models/instances.txt b/docs/ref/models/instances.txt
index d7c4ee377a..f55ce65699 100644
--- a/docs/ref/models/instances.txt
+++ b/docs/ref/models/instances.txt
@@ -5,7 +5,7 @@ Model instance reference
========================
.. currentmodule:: django.db.models
-
+
This document describes the details of the ``Model`` API. It builds on the
material presented in the :ref:`model <topics-db-models>` and :ref:`database
query <topics-db-queries>` guides, so you'll probably want to read and
@@ -366,8 +366,7 @@ Extra instance methods
In addition to ``save()``, ``delete()``, a model object might get any or all
of the following methods:
-get_FOO_display()
------------------
+.. method:: Model.get_FOO_display()
For every field that has ``choices`` set, the object will have a
``get_FOO_display()`` method, where ``FOO`` is the name of the field. This
@@ -391,8 +390,8 @@ following model::
>>> p.get_gender_display()
'Male'
-get_next_by_FOO(\**kwargs) and get_previous_by_FOO(\**kwargs)
--------------------------------------------------------------
+.. method:: Model.get_next_by_FOO(\**kwargs)
+.. method:: Model.get_previous_by_FOO(\**kwargs)
For every ``DateField`` and ``DateTimeField`` that does not have ``null=True``,
the object will have ``get_next_by_FOO()`` and ``get_previous_by_FOO()``