summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2009-02-22 06:10:29 +0000
committerRussell Keith-Magee <russell@keith-magee.com>2009-02-22 06:10:29 +0000
commit0c2a5ebe97c598be4e74f7d9ca6eff2e9af21b63 (patch)
treeec48986ad9433cfe2866d3f4d1744d33c76262da /docs
parenta50a188a626a699dd205e05ab4caaa7963773132 (diff)
Fixed #9347 -- Added an entry in the field reference for the verbose_name option. Thanks to marcoberi for the suggestion, and timo for the eventual patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9865 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/models/fields.txt9
-rw-r--r--docs/topics/db/models.txt2
2 files changed, 11 insertions, 0 deletions
diff --git a/docs/ref/models/fields.txt b/docs/ref/models/fields.txt
index 48cc422231..63018f6611 100644
--- a/docs/ref/models/fields.txt
+++ b/docs/ref/models/fields.txt
@@ -270,6 +270,15 @@ respect to the month.
Like :attr:`~Field.unique_for_date` and :attr:`~Field.unique_for_month`.
+``verbose_name``
+-------------------
+
+.. attribute:: Field.verbose_name
+
+A human-readable name for the field. If the verbose name isn't given, Django
+will automatically create it using the field's attribute name, converting
+underscores to spaces. See :ref:`Verbose field names <verbose-field-names>`.
+
.. _model-field-types:
Field types
diff --git a/docs/topics/db/models.txt b/docs/topics/db/models.txt
index ddcd020f6d..0c87cdc9d1 100644
--- a/docs/topics/db/models.txt
+++ b/docs/topics/db/models.txt
@@ -218,6 +218,8 @@ sees you've explicitly set :attr:`Field.primary_key`, it won't add the automatic
Each model requires exactly one field to have :attr:`primary_key=True
<Field.primary_key>`.
+.. _verbose-field-names:
+
Verbose field names
-------------------