Skip to content

Commit 18b3a9d

Browse files
Antoliny0919sarahboyce
authored andcommitted
Fixed #35889 -- Corrected reference of default widgets in "Styling widget instance" docs.
1 parent 5c3b9d0 commit 18b3a9d

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

docs/ref/forms/widgets.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,9 @@ For example, take the following form::
142142
url = forms.URLField()
143143
comment = forms.CharField()
144144

145-
This form will include three default :class:`TextInput` widgets, with default
146-
rendering -- no CSS class, no extra attributes. This means that the input boxes
147-
provided for each widget will be rendered exactly the same:
145+
This form will include :class:`TextInput` widgets for the name and comment
146+
fields, and a :class:`URLInput` widget for the url field. Each has default
147+
rendering - no CSS class, no extra attributes:
148148

149149
.. code-block:: pycon
150150

@@ -154,11 +154,11 @@ provided for each widget will be rendered exactly the same:
154154
<div>Url:<input type="url" name="url" required></div>
155155
<div>Comment:<input type="text" name="comment" required></div>
156156

157-
On a real web page, you probably don't want every widget to look the same. You
158-
might want a larger input element for the comment, and you might want the
159-
'name' widget to have some special CSS class. It is also possible to specify
160-
the 'type' attribute to take advantage of the new HTML5 input types. To do
161-
this, you use the :attr:`Widget.attrs` argument when creating the widget::
157+
On a real web page, you probably want to customize this. You might want a
158+
larger input element for the comment, and you might want the 'name' widget to
159+
have some special CSS class. It is also possible to specify the 'type'
160+
attribute to use a different HTML5 input type. To do this, you use the
161+
:attr:`Widget.attrs` argument when creating the widget::
162162

163163
class CommentForm(forms.Form):
164164
name = forms.CharField(widget=forms.TextInput(attrs={"class": "special"}))

0 commit comments

Comments
 (0)