@@ -142,9 +142,9 @@ For example, take the following form::
142
142
url = forms.URLField()
143
143
comment = forms.CharField()
144
144
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 :
148
148
149
149
.. code-block:: pycon
150
150
@@ -154,11 +154,11 @@ provided for each widget will be rendered exactly the same:
154
154
<div>Url:<input type="url" name="url" required></div>
155
155
<div>Comment:<input type="text" name="comment" required></div>
156
156
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::
162
162
163
163
class CommentForm(forms.Form):
164
164
name = forms.CharField(widget=forms.TextInput(attrs={"class": "special"}))
0 commit comments