Commit 1697f4e4 authored by Gary Wilson Jr's avatar Gary Wilson Jr
Browse files

Fixed a couple typos in the modeltests' descriptions and made use of ReST...

Fixed a couple typos in the modeltests' descriptions and made use of ReST inline literal markup for code snippets.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@8325 bcc190cf-cafb-0310-a4f2-bffc1f526a37
parent c4d07d4d
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -11,7 +11,7 @@ query the database.

If you need to use a table name for a many-to-many relationship that differs
from the default generated name, use the ``db_table`` parameter on the
ManyToMany field. This has no effect on the API for querying the database.
``ManyToMany`` field. This has no effect on the API for querying the database.

"""

+2 −2
Original line number Diff line number Diff line
"""
42. Storing files according to a custom storage system

FileField and its variations can take a "storage" argument to specify how and
where files should be stored.
``FileField`` and its variations can take a ``storage`` argument to specify how
and where files should be stored.
"""

import tempfile
+1 −1
Original line number Diff line number Diff line
@@ -5,7 +5,7 @@ Fixtures are a way of loading data into the database in bulk. Fixure data
can be stored in any serializable format (including JSON and XML). Fixtures
are identified by name, and are stored in either a directory named 'fixtures'
in the application directory, on in one of the directories named in the
FIXTURE_DIRS setting.
``FIXTURE_DIRS`` setting.
"""

from django.db import models
+4 −4
Original line number Diff line number Diff line
@@ -2,8 +2,8 @@
34. Generic relations

Generic relations let an object have a foreign key to any object through a
content-type/object-id field. A generic foreign key can point to any object,
be it animal, vegetable, or mineral.
content-type/object-id field. A ``GenericForeignKey`` field can point to any
object, be it animal, vegetable, or mineral.

The canonical example is tags (although this example implementation is *far*
from complete).
+4 −4
Original line number Diff line number Diff line
@@ -2,10 +2,10 @@
8. get_latest_by

Models can have a ``get_latest_by`` attribute, which should be set to the name
of a DateField or DateTimeField. If ``get_latest_by`` exists, the model's
manager will get a ``latest()`` method, which will return the latest object in
the database according to that field. "Latest" means "having the date farthest
into the future."
of a ``DateField`` or ``DateTimeField``. If ``get_latest_by`` exists, the
model's manager will get a ``latest()`` method, which will return the latest
object in the database according to that field. "Latest" means "having the date
farthest into the future."
"""

from django.db import models
Loading