From 3bd9852401cfbc8a1dfec4082303a5514ee69bf4 Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Thu, 6 Jun 2013 14:15:26 -0400 Subject: [1.5.x] Fixed #20567 - Documented BoundField.id_for_label. Thanks littlepig for the suggestion. Backport of 175a102ddc from master. --- docs/ref/forms/widgets.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'docs/ref/forms/widgets.txt') diff --git a/docs/ref/forms/widgets.txt b/docs/ref/forms/widgets.txt index 98383b89dd..ac16b3c02a 100644 --- a/docs/ref/forms/widgets.txt +++ b/docs/ref/forms/widgets.txt @@ -163,6 +163,9 @@ Django will then include the extra attributes in the rendered output: Url: Comment: +You can also set the HTML ``id`` using :attr:`~Widget.attrs`. See +:attr:`BoundField.id_for_label` for an example. + .. _styling-widget-classes: Styling widget classes @@ -249,6 +252,8 @@ foundation for custom widgets. :class:`~datetime.datetime` value into a list with date and time split into two separate values:: + from django.forms import MultiWidget + class SplitDateTimeWidget(MultiWidget): # ... -- cgit v1.3