summaryrefslogtreecommitdiff
path: root/docs/topics/db/models.txt
diff options
context:
space:
mode:
Diffstat (limited to 'docs/topics/db/models.txt')
-rw-r--r--docs/topics/db/models.txt20
1 files changed, 9 insertions, 11 deletions
diff --git a/docs/topics/db/models.txt b/docs/topics/db/models.txt
index 6d7a7a4374..0ff34ea0e1 100644
--- a/docs/topics/db/models.txt
+++ b/docs/topics/db/models.txt
@@ -1,5 +1,3 @@
-.. _topics-db-models:
-
======
Models
======
@@ -18,7 +16,7 @@ The basics:
* Each attribute of the model represents a database field.
* With all of this, Django gives you an automatically-generated
- database-access API; see :ref:`topics-db-queries`.
+ database-access API; see :doc:`/topics/db/queries`.
.. seealso::
@@ -64,7 +62,7 @@ Some technical notes:
* The ``CREATE TABLE`` SQL in this example is formatted using PostgreSQL
syntax, but it's worth noting Django uses SQL tailored to the database
- backend specified in your :ref:`settings file <topics-settings>`.
+ backend specified in your :doc:`settings file </topics/settings>`.
Using models
============
@@ -126,7 +124,7 @@ determine a few things:
Django ships with dozens of built-in field types; you can find the complete list
in the :ref:`model field reference <model-field-types>`. You can easily write
your own fields if Django's built-in ones don't do the trick; see
-:ref:`howto-custom-model-fields`.
+:doc:`/howto/custom-model-fields`.
Field options
-------------
@@ -353,7 +351,7 @@ For example, if a ``Pizza`` has multiple ``Topping`` objects -- that is, a
As with :class:`~django.db.models.ForeignKey`, you can also create
:ref:`recursive relationships <recursive-relationships>` (an object with a
-many-to-one relationship to itself) and :ref:`relationships to models not yet
+many-to-many relationship to itself) and :ref:`relationships to models not yet
defined <lazy-relationships>`; see :ref:`the model field reference
<ref-manytomany>` for details.
@@ -612,7 +610,7 @@ Custom field types
If one of the existing model fields cannot be used to fit your purposes, or if
you wish to take advantage of some less common database column types, you can
create your own field class. Full coverage of creating your own fields is
-provided in :ref:`howto-custom-model-fields`.
+provided in :doc:`/howto/custom-model-fields`.
.. _meta-options:
@@ -634,8 +632,8 @@ human-readable singular and plural names (:attr:`~Options.verbose_name` and
:attr:`~Options.verbose_name_plural`). None are required, and adding ``class
Meta`` to a model is completely optional.
-A complete list of all possible ``Meta`` options can be found in the :ref:`model
-option reference <ref-models-options>`.
+A complete list of all possible ``Meta`` options can be found in the :doc:`model
+option reference </ref/models/options>`.
.. _model-methods:
@@ -684,7 +682,7 @@ properties`_.
.. _Read more about properties: http://www.python.org/download/releases/2.2/descrintro/#property
-The :ref:`model instance reference <ref-models-instances>` has a complete list
+The :doc:`model instance reference </ref/models/instances>` has a complete list
of :ref:`methods automatically given to each model <model-instance-methods>`.
You can override most of these -- see `overriding predefined model methods`_,
below -- but there are a couple that you'll almost always want to define:
@@ -763,7 +761,7 @@ Executing custom SQL
Another common pattern is writing custom SQL statements in model methods and
module-level methods. For more details on using raw SQL, see the documentation
-on :ref:`using raw SQL<topics-db-sql>`.
+on :doc:`using raw SQL</topics/db/sql>`.
.. _model-inheritance: