summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2013-07-26 14:43:46 -0400
committerTim Graham <timograham@gmail.com>2013-07-26 14:45:38 -0400
commit8676318d2dae9a570d2314e4e6da8c00aaf2e2a0 (patch)
tree86e3bd1bd11dd09d9aaf288357f9feacffb3d363 /docs
parent2a979d2a7bec485e4b90b7ae99ace0dd16faa948 (diff)
Fixed #20805 -- Removed an extra colon beside checkboxes in the admin.
Thanks CollinAnderson for the report.
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/forms/api.txt15
-rw-r--r--docs/releases/1.6.txt4
2 files changed, 17 insertions, 2 deletions
diff --git a/docs/ref/forms/api.txt b/docs/ref/forms/api.txt
index 7c1601d3ea..780cb5d4f7 100644
--- a/docs/ref/forms/api.txt
+++ b/docs/ref/forms/api.txt
@@ -527,6 +527,11 @@ Note that the label suffix is added only if the last character of the
label isn't a punctuation character (in English, those are ``.``, ``!``, ``?``
or ``:``).
+.. versionadded:: 1.6
+
+You can also customize the ``label_suffix`` on a per-field basis using the
+``label_suffix`` parameter to :meth:`~django.forms.BoundField.label_tag`.
+
Notes on field ordering
~~~~~~~~~~~~~~~~~~~~~~~
@@ -653,7 +658,7 @@ when printed::
>>> str(f['subject'].errors)
''
-.. method:: BoundField.label_tag(contents=None, attrs=None)
+.. method:: BoundField.label_tag(contents=None, attrs=None, label_suffix=None)
To separately render the label tag of a form field, you can call its
``label_tag`` method::
@@ -671,6 +676,14 @@ additional attributes for the ``<label>`` tag.
The label now includes the form's :attr:`~django.forms.Form.label_suffix`
(a colon, by default).
+.. versionadded:: 1.6
+
+ The optional ``label_suffix`` parameter allows you to override the form's
+ :attr:`~django.forms.Form.label_suffix`. For example, you can use an empty
+ string to hide the label on selected fields. If you need to do this in a
+ template, you could write a custom filter to allow passing parameters to
+ ``label_tag``.
+
.. method:: BoundField.css_classes()
When you use Django's rendering shortcuts, CSS classes are used to
diff --git a/docs/releases/1.6.txt b/docs/releases/1.6.txt
index 73b48edc85..355b107046 100644
--- a/docs/releases/1.6.txt
+++ b/docs/releases/1.6.txt
@@ -664,7 +664,9 @@ will render something like:
<label for="id_my_field">My Field:</label> <input id="id_my_field" type="text" name="my_field" />
If you want to keep the current behavior of rendering ``label_tag`` without
-the ``label_suffix``, instantiate the form ``label_suffix=''``.
+the ``label_suffix``, instantiate the form ``label_suffix=''``. You can also
+customize the ``label_suffix`` on a per-field basis using the new
+``label_suffix`` parameter on :meth:`~django.forms.BoundField.label_tag`.
Admin views ``_changelist_filters`` GET parameter
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~