mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #14141: docs now use the :doc: construct for links between documents.
Thanks, Ramiro Morales. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13608 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
.. _ref-models-fields:
|
||||
|
||||
=====================
|
||||
Model field reference
|
||||
=====================
|
||||
@@ -14,8 +12,8 @@ This document contains all the gory details about all the `field options`_ and
|
||||
|
||||
.. seealso::
|
||||
|
||||
If the built-in fields don't do the trick, you can easily :ref:`write your
|
||||
own custom model fields <howto-custom-model-fields>`.
|
||||
If the built-in fields don't do the trick, you can easily :doc:`write your
|
||||
own custom model fields </howto/custom-model-fields>`.
|
||||
|
||||
.. note::
|
||||
|
||||
@@ -302,8 +300,8 @@ underscores to spaces. See :ref:`Verbose field names <verbose-field-names>`.
|
||||
|
||||
.. attribute:: Field.validators
|
||||
|
||||
A list of validators to run for this field.See the :ref:`validators
|
||||
documentation <ref-validators>` for more information.
|
||||
A list of validators to run for this field.See the :doc:`validators
|
||||
documentation </ref/validators>` for more information.
|
||||
|
||||
|
||||
Field types
|
||||
@@ -370,8 +368,8 @@ The admin represents this as an ``<input type="text">`` (a single-line input).
|
||||
|
||||
If you are writing an application that must be portable to multiple
|
||||
database backends, you should be aware that there are restrictions on
|
||||
``max_length`` for some backends. Refer to the :ref:`database backend
|
||||
notes <ref-databases>` for details.
|
||||
``max_length`` for some backends. Refer to the :doc:`database backend
|
||||
notes </ref/databases>` for details.
|
||||
|
||||
.. admonition:: MySQL users
|
||||
|
||||
@@ -518,7 +516,7 @@ Also has one optional argument:
|
||||
.. versionadded:: 1.0
|
||||
|
||||
Optional. A storage object, which handles the storage and retrieval of your
|
||||
files. See :ref:`topics-files` for details on how to provide this object.
|
||||
files. See :doc:`/topics/files` for details on how to provide this object.
|
||||
|
||||
The admin represents this field as an ``<input type="file">`` (a file-upload
|
||||
widget).
|
||||
@@ -553,7 +551,7 @@ day. If you upload a file on Jan. 15, 2007, it will be saved in the directory
|
||||
If you want to retrieve the upload file's on-disk filename, or a URL that refers
|
||||
to that file, or the file's size, you can use the
|
||||
:attr:`~django.core.files.File.name`, :attr:`~django.core.files.File.url`
|
||||
and :attr:`~django.core.files.File.size` attributes; see :ref:`topics-files`.
|
||||
and :attr:`~django.core.files.File.size` attributes; see :doc:`/topics/files`.
|
||||
|
||||
Note that whenever you deal with uploaded files, you should pay close attention
|
||||
to where you're uploading them and what type of files they are, to avoid
|
||||
@@ -903,7 +901,7 @@ define the details of how the relation works.
|
||||
|
||||
.. attribute:: ForeignKey.limit_choices_to
|
||||
|
||||
A dictionary of lookup arguments and values (see :ref:`topics-db-queries`)
|
||||
A dictionary of lookup arguments and values (see :doc:`/topics/db/queries`)
|
||||
that limit the available admin choices for this object. Use this with
|
||||
functions from the Python ``datetime`` module to limit choices of objects by
|
||||
date. For example::
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
.. _ref-models-index:
|
||||
|
||||
======
|
||||
Models
|
||||
======
|
||||
|
||||
Model API reference. For introductory material, see :ref:`topics-db-models`.
|
||||
Model API reference. For introductory material, see :doc:`/topics/db/models`.
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
.. _ref-models-instances:
|
||||
|
||||
========================
|
||||
Model instance reference
|
||||
========================
|
||||
@@ -7,13 +5,13 @@ 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
|
||||
material presented in the :doc:`model </topics/db/models>` and :doc:`database
|
||||
query </topics/db/queries>` guides, so you'll probably want to read and
|
||||
understand those documents before reading this one.
|
||||
|
||||
Throughout this reference we'll use the :ref:`example weblog models
|
||||
<queryset-model-example>` presented in the :ref:`database query guide
|
||||
<topics-db-queries>`.
|
||||
<queryset-model-example>` presented in the :doc:`database query guide
|
||||
</topics/db/queries>`.
|
||||
|
||||
Creating objects
|
||||
================
|
||||
@@ -45,8 +43,8 @@ All three steps are performed when you call by a model's
|
||||
|
||||
When you use a ``ModelForm``, the call to ``is_valid()`` will perform
|
||||
these validation steps for all the fields that are included on the
|
||||
form. (See the :ref:`ModelForm documentation
|
||||
<topics-forms-modelforms>` for more information.) You should only need
|
||||
form. (See the :doc:`ModelForm documentation
|
||||
</topics/forms/modelforms>` for more information.) You should only need
|
||||
to call a model's ``full_clean()`` method if you plan to handle
|
||||
validation errors yourself, or if you have excluded fields from the
|
||||
ModelForm that require validation.
|
||||
@@ -215,7 +213,7 @@ What happens when you save?
|
||||
|
||||
When you save an object, Django performs the following steps:
|
||||
|
||||
1. **Emit a pre-save signal.** The :ref:`signal <ref-signals>`
|
||||
1. **Emit a pre-save signal.** The :doc:`signal </ref/signals>`
|
||||
:attr:`django.db.models.signals.pre_save` is sent, allowing any
|
||||
functions listening for that signal to take some customized
|
||||
action.
|
||||
@@ -426,8 +424,8 @@ Django uses this in its admin interface. If an object defines
|
||||
link that will jump you directly to the object's public view, according to
|
||||
``get_absolute_url()``.
|
||||
|
||||
Also, a couple of other bits of Django, such as the :ref:`syndication feed
|
||||
framework <ref-contrib-syndication>`, use ``get_absolute_url()`` as a
|
||||
Also, a couple of other bits of Django, such as the :doc:`syndication feed
|
||||
framework </ref/contrib/syndication>`, use ``get_absolute_url()`` as a
|
||||
convenience to reward people who've defined the method.
|
||||
|
||||
It's good practice to use ``get_absolute_url()`` in templates, instead of
|
||||
@@ -523,8 +521,8 @@ of the view name::
|
||||
def get_absolute_url(self):
|
||||
return ('people_view', [str(self.id)])
|
||||
|
||||
More details on named URL patterns are in the :ref:`URL dispatch documentation
|
||||
<topics-http-urls>`.
|
||||
More details on named URL patterns are in the :doc:`URL dispatch documentation
|
||||
</topics/http/urls>`.
|
||||
|
||||
Extra instance methods
|
||||
======================
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
.. _ref-models-options:
|
||||
|
||||
======================
|
||||
Model ``Meta`` options
|
||||
======================
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
.. _ref-models-querysets:
|
||||
|
||||
======================
|
||||
QuerySet API reference
|
||||
======================
|
||||
@@ -7,13 +5,13 @@ QuerySet API reference
|
||||
.. currentmodule:: django.db.models.QuerySet
|
||||
|
||||
This document describes the details of the ``QuerySet`` 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
|
||||
material presented in the :doc:`model </topics/db/models>` and :doc:`database
|
||||
query </topics/db/queries>` guides, so you'll probably want to read and
|
||||
understand those documents before reading this one.
|
||||
|
||||
Throughout this reference we'll use the :ref:`example weblog models
|
||||
<queryset-model-example>` presented in the :ref:`database query guide
|
||||
<topics-db-queries>`.
|
||||
<queryset-model-example>` presented in the :doc:`database query guide
|
||||
</topics/db/queries>`.
|
||||
|
||||
.. _when-querysets-are-evaluated:
|
||||
|
||||
@@ -223,8 +221,8 @@ control the name of the annotation::
|
||||
>>> q[0].number_of_entries
|
||||
42
|
||||
|
||||
For an in-depth discussion of aggregation, see :ref:`the topic guide on
|
||||
Aggregation <topics-db-aggregation>`.
|
||||
For an in-depth discussion of aggregation, see :doc:`the topic guide on
|
||||
Aggregation </topics/db/aggregation>`.
|
||||
|
||||
``order_by(*fields)``
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
@@ -1205,8 +1203,8 @@ control the name of the aggregation value that is returned::
|
||||
>>> q = Blog.objects.aggregate(number_of_entries=Count('entry'))
|
||||
{'number_of_entries': 16}
|
||||
|
||||
For an in-depth discussion of aggregation, see :ref:`the topic guide on
|
||||
Aggregation <topics-db-aggregation>`.
|
||||
For an in-depth discussion of aggregation, see :doc:`the topic guide on
|
||||
Aggregation </topics/db/aggregation>`.
|
||||
|
||||
``exists()``
|
||||
~~~~~~~~~~~~
|
||||
@@ -1266,7 +1264,7 @@ SQL equivalents::
|
||||
a Django setting. It's possible to configure your MySQL tables to use
|
||||
case-sensitive comparisons, but some trade-offs are involved. For more
|
||||
information about this, see the :ref:`collation section <mysql-collation>`
|
||||
in the :ref:`databases <ref-databases>` documentation.
|
||||
in the :doc:`databases </ref/databases>` documentation.
|
||||
|
||||
.. fieldlookup:: iexact
|
||||
|
||||
@@ -1725,7 +1723,7 @@ Aggregation Functions
|
||||
Django provides the following aggregation functions in the
|
||||
``django.db.models`` module. For details on how to use these
|
||||
aggregate functions, see
|
||||
:ref:`the topic guide on aggregation <topics-db-aggregation>`.
|
||||
:doc:`the topic guide on aggregation </topics/db/aggregation>`.
|
||||
|
||||
``Avg``
|
||||
~~~~~~~
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
.. _ref-models-relations:
|
||||
|
||||
=========================
|
||||
Related objects reference
|
||||
=========================
|
||||
|
||||
Reference in New Issue
Block a user