mirror of https://github.com/django/django.git
Fixed #1815 -- Fixed ReST errors in docs. Thanks, nico@teknico.net
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2869 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
8eecb95ec8
commit
4b69ef637a
|
@ -1070,7 +1070,7 @@ Lookups that span relationships
|
|||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Django offers a powerful and intuitive way to "follow" relationships in
|
||||
lookups, taking care of the SQL ``JOIN``s for you automatically, behind the
|
||||
lookups, taking care of the SQL ``JOIN``\s for you automatically, behind the
|
||||
scenes. To span a relationship, just use the field name of related fields
|
||||
across models, separated by double underscores, until you get to the field you
|
||||
want.
|
||||
|
|
|
@ -62,6 +62,8 @@ Most generic views require the ``queryset`` key, which is a ``QuerySet``
|
|||
instance; see the `database API docs`_ for more information about ``Queryset``
|
||||
objects.
|
||||
|
||||
.. _database API docs: http://www.djangoproject.com/documentation/db_api/
|
||||
|
||||
"Simple" generic views
|
||||
======================
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ Some technical notes:
|
|||
* The name of the table, ``myapp_person``, is automatically derived from
|
||||
some model metadata but can be overridden. See _`Table names` below.
|
||||
* An ``id`` field is added automatically, but this behavior can be
|
||||
overriden. See _`Automatic primary key fields` below.
|
||||
overriden. See `Automatic primary key fields`_ below.
|
||||
* 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 `settings file`_.
|
||||
|
@ -124,7 +124,7 @@ Here are all available field types:
|
|||
An ``IntegerField`` that automatically increments according to available IDs.
|
||||
You usually won't need to use this directly; a primary key field will
|
||||
automatically be added to your model if you don't specify otherwise. See
|
||||
_`Automatic primary key fields`.
|
||||
`Automatic primary key fields`_.
|
||||
|
||||
``BooleanField``
|
||||
~~~~~~~~~~~~~~~~
|
||||
|
@ -1111,7 +1111,7 @@ If ``fields`` isn't given, Django will default to displaying each field that
|
|||
isn't an ``AutoField`` and has ``editable=True``, in a single fieldset, in
|
||||
the same order as the fields are defined in the model.
|
||||
|
||||
The ``field_options`` dictionary can have the following keys::
|
||||
The ``field_options`` dictionary can have the following keys:
|
||||
|
||||
``fields``
|
||||
~~~~~~~~~~
|
||||
|
@ -1312,6 +1312,8 @@ The way ``Manager`` classes work is documented in the `Retrieving objects`_
|
|||
section of the database API docs, but this section specifically touches on
|
||||
model options that customize ``Manager`` behavior.
|
||||
|
||||
.. _Retrieving objects: http://www.djangoproject.com/documentation/db_api/#retrieving-objects
|
||||
|
||||
Manager names
|
||||
-------------
|
||||
|
||||
|
@ -1401,11 +1403,11 @@ example, using this model::
|
|||
|
||||
...the statement ``Book.objects.all()`` will return all books in the database.
|
||||
|
||||
You can override a ``Manager``'s base ``QuerySet`` by overriding the
|
||||
You can override a ``Manager``\'s base ``QuerySet`` by overriding the
|
||||
``Manager.get_query_set()`` method. ``get_query_set()`` should return a
|
||||
``QuerySet`` with the properties you require.
|
||||
|
||||
For example, the following model has *two* ``Manager``s -- one that returns
|
||||
For example, the following model has *two* ``Manager``\s -- one that returns
|
||||
all objects, and one that returns only the books by Roald Dahl::
|
||||
|
||||
# First, define the Manager subclass.
|
||||
|
|
|
@ -102,7 +102,7 @@ All attributes except ``session`` should be considered read-only.
|
|||
``AuthenticationMiddleware`` activated. For more, see
|
||||
`Authentication in Web requests`_.
|
||||
|
||||
.. Authentication in Web requests: http://www.djangoproject.com/documentation/authentication/#authentication-in-web-requests
|
||||
.. _Authentication in Web requests: http://www.djangoproject.com/documentation/authentication/#authentication-in-web-requests
|
||||
|
||||
``session``
|
||||
A readable-and-writable, dictionary-like object that represents the current
|
||||
|
|
|
@ -69,7 +69,7 @@ These files are:
|
|||
* ``urls.py``: The URL declarations for this Django project; a "table of
|
||||
contents" of your Django-powered site.
|
||||
|
||||
.. _more on packages: http://docs.python.org/tut/node8.html#packages
|
||||
.. _more about packages: http://docs.python.org/tut/node8.html#packages
|
||||
|
||||
The development server
|
||||
----------------------
|
||||
|
|
Loading…
Reference in New Issue