Made a bunch of tiny documentation formatting and typo fixes.
Thanks, quicklizard, adamv, Gary Wilson, superjudge and David Pretty. Fixed #6554, #6573 ,#6592, #6595, #6608. git-svn-id: http://code.djangoproject.com/svn/django/trunk@7119 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
87ca6ae4cc
commit
d9a3c1b9fc
|
@ -767,7 +767,7 @@ a command that can be executed as an action when you run ``manage.py``::
|
||||||
views.py
|
views.py
|
||||||
|
|
||||||
In this example, the ``explode`` command will be made available to any project
|
In this example, the ``explode`` command will be made available to any project
|
||||||
that includes the ``fancy_blog`` application in ``settings.INSTALLED_APPS``.
|
that includes the ``blog`` application in ``settings.INSTALLED_APPS``.
|
||||||
|
|
||||||
The ``explode.py`` module has only one requirement -- it must define a class
|
The ``explode.py`` module has only one requirement -- it must define a class
|
||||||
called ``Command`` that extends ``django.core.management.base.BaseCommand``.
|
called ``Command`` that extends ``django.core.management.base.BaseCommand``.
|
||||||
|
|
|
@ -384,7 +384,7 @@ The admin represents this as an ``<input type="text">`` (a single-line input).
|
||||||
``IPAddressField``
|
``IPAddressField``
|
||||||
~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
An IP address, in string format (i.e. "24.124.1.30").
|
An IP address, in string format (e.g. "192.0.2.30").
|
||||||
|
|
||||||
The admin represents this as an ``<input type="text">`` (a single-line input).
|
The admin represents this as an ``<input type="text">`` (a single-line input).
|
||||||
|
|
||||||
|
@ -952,7 +952,7 @@ the relationship should work. All are optional:
|
||||||
``limit_choices_to`` See the description under ``ForeignKey`` above.
|
``limit_choices_to`` See the description under ``ForeignKey`` above.
|
||||||
|
|
||||||
``symmetrical`` Only used in the definition of ManyToManyFields on self.
|
``symmetrical`` Only used in the definition of ManyToManyFields on self.
|
||||||
Consider the following model:
|
Consider the following model::
|
||||||
|
|
||||||
class Person(models.Model):
|
class Person(models.Model):
|
||||||
friends = models.ManyToManyField("self")
|
friends = models.ManyToManyField("self")
|
||||||
|
@ -1872,7 +1872,7 @@ more simply as::
|
||||||
|
|
||||||
If you define a ``__unicode__()`` method on your model and not a ``__str__()``
|
If you define a ``__unicode__()`` method on your model and not a ``__str__()``
|
||||||
method, Django will automatically provide you with a ``__str__()`` that calls
|
method, Django will automatically provide you with a ``__str__()`` that calls
|
||||||
``__unicode()__`` and then converts the result correctly to a UTF-8 encoded
|
``__unicode__()`` and then converts the result correctly to a UTF-8 encoded
|
||||||
string object. This is recommended development practice: define only
|
string object. This is recommended development practice: define only
|
||||||
``__unicode__()`` and let Django take care of the conversion to string objects
|
``__unicode__()`` and let Django take care of the conversion to string objects
|
||||||
when required.
|
when required.
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
6. Specifying ordering
|
6. Specifying ordering
|
||||||
|
|
||||||
Specify default ordering for a model using the ``ordering`` attribute, which
|
Specify default ordering for a model using the ``ordering`` attribute, which
|
||||||
should be a list or tuple of field names. This tells Django how to order the
|
should be a list or tuple of field names. This tells Django how to order
|
||||||
results of ``get_list()`` and other similar functions.
|
queryset results.
|
||||||
|
|
||||||
If a field name in ``ordering`` starts with a hyphen, that field will be
|
If a field name in ``ordering`` starts with a hyphen, that field will be
|
||||||
ordered in descending order. Otherwise, it'll be ordered in ascending order.
|
ordered in descending order. Otherwise, it'll be ordered in ascending order.
|
||||||
|
|
Loading…
Reference in New Issue