Fixed #8705: Corrected some formatting issues in models documentation

git-svn-id: http://code.djangoproject.com/svn/django/trunk@8788 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
James Bennett 2008-09-01 09:35:07 +00:00
parent b085ccce6c
commit f88fb967bd
1 changed files with 3 additions and 10 deletions

View File

@ -143,14 +143,12 @@ optional. They're fully explained in the :ref:`reference
ones: ones:
:attr:`~Field.null` :attr:`~Field.null`
If ``True``, Django will store empty values as ``NULL`` in the database. If ``True``, Django will store empty values as ``NULL`` in the database.
Default is ``False``. Default is ``False``.
:attr:`~Field.blank` :attr:`~Field.blank`
If ``True``, the field is allowed to be blank. Default is ``False``. If ``True``, the field is allowed to be blank. Default is ``False``.
Note that this is different than :attr:`~Field.null`. Note that this is different than :attr:`~Field.null`.
:attr:`~Field.null` is purely database-related, whereas :attr:`~Field.null` is purely database-related, whereas
:attr:`~Field.blank` is validation-related. If a field has :attr:`~Field.blank` is validation-related. If a field has
@ -159,7 +157,6 @@ ones:
<Field.blank>`, the field will be required. <Field.blank>`, the field will be required.
:attr:`~Field.choices` :attr:`~Field.choices`
An iterable (e.g., a list or tuple) of 2-tuples to use as choices for An iterable (e.g., a list or tuple) of 2-tuples to use as choices for
this field. If this is given, Django's admin will use a select box this field. If this is given, Django's admin will use a select box
instead of the standard text field and will limit choices to the choices instead of the standard text field and will limit choices to the choices
@ -174,21 +171,18 @@ ones:
('SR', 'Senior'), ('SR', 'Senior'),
('GR', 'Graduate'), ('GR', 'Graduate'),
) )
:attr:`~Field.default`
:attr:`~Field.default`
The default value for the field. This can be a value or a callable The default value for the field. This can be a value or a callable
object. If callable it will be called every time a new object is object. If callable it will be called every time a new object is
created. created.
:attr:`~Field.help_text`
:attr:`~Field.help_text`
Extra "help" text to be displayed under the field on the object's admin Extra "help" text to be displayed under the field on the object's admin
form. It's useful for documentation even if your object doesn't have an form. It's useful for documentation even if your object doesn't have an
admin form. admin form.
:attr:`~Field.primary_key` :attr:`~Field.primary_key`
If ``True``, this field is the primary key for the model. If ``True``, this field is the primary key for the model.
If you don't specify :attr:`primary_key=True <Field.primary_key>` for If you don't specify :attr:`primary_key=True <Field.primary_key>` for
@ -199,7 +193,6 @@ ones:
see :ref:`automatic-primary-key-fields`. see :ref:`automatic-primary-key-fields`.
:attr:`~Field.unique` :attr:`~Field.unique`
If ``True``, this field must be unique throughout the table. If ``True``, this field must be unique throughout the table.
Again, these are just short descriptions of the most common field options. Full Again, these are just short descriptions of the most common field options. Full