[Django] #35889: Django widgets document customizing widget instances section incorrect sentence.

8 views
Skip to first unread message

Django

unread,
Nov 6, 2024, 1:57:10 AM11/6/24
to django-...@googlegroups.com
#35889: Django widgets document customizing widget instances section incorrect
sentence.
-------------------------------------+-------------------------------------
Reporter: Antoliny | Type:
| Cleanup/optimization
Status: new | Component:
| Documentation
Version: 5.0 | Severity: Normal
Keywords: Widget Document | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Hello!
I found an incorrect sentence in the
[https://docs.djangoproject.com/en/5.1/ref/forms/widgets/#styling-widget-
instances Django widgets document customizing widget instances section].

{{{
For example, take the following form::

from django import forms


class CommentForm(forms.Form):
name = forms.CharField()
url = forms.URLField()
comment = forms.CharField()

This form will include three default :class:`TextInput` widgets, with
default
rendering -- no CSS class, no extra attributes. This means that the input
boxes
provided for each widget will be rendered exactly the same:
}}}
The fields used in the above example CommentForm are CharField and
URLField.
And the document has the following explanation.
**"This form will include three default TextInput widgets"**
[https://docs.djangoproject.com/en/5.1/ref/forms/fields/ CharField default
widget] is TextInput, but
[https://docs.djangoproject.com/en/5.1/ref/forms/fields/#urlfield URLField
default widget] is URLInput.
That's why I think this sentence is wrong and should be corrected.
--
Ticket URL: <https://code.djangoproject.com/ticket/35889>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Nov 6, 2024, 1:57:19 AM11/6/24
to django-...@googlegroups.com
#35889: Django widgets document customizing widget instances section incorrect
sentence.
-------------------------------------+-------------------------------------
Reporter: Antoliny | Owner: Antoliny
Type: | Status: assigned
Cleanup/optimization |
Component: Documentation | Version: 5.0
Severity: Normal | Resolution:
Keywords: Widget Document | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Antoliny):

* owner: (none) => Antoliny
* status: new => assigned

--
Ticket URL: <https://code.djangoproject.com/ticket/35889#comment:1>

Django

unread,
Nov 6, 2024, 2:01:09 AM11/6/24
to django-...@googlegroups.com
#35889: Django widgets document customizing widget instances section incorrect
sentence.
-------------------------------------+-------------------------------------
Reporter: Antoliny | Owner: Antoliny
Type: | Status: assigned
Cleanup/optimization |
Component: Documentation | Version: 5.0
Severity: Normal | Resolution:
Keywords: Widget Document | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Antoliny):

I'm thinking about how to revise this sentence. How about this sentence?
**"This form will include TextInput, URLInput widgets, with default
rendering - no CSS class, no extra attributes. This means that the input
boxes provided for each widget will be rendered almost the same:"**
--
Ticket URL: <https://code.djangoproject.com/ticket/35889#comment:2>

Django

unread,
Nov 6, 2024, 2:04:10 AM11/6/24
to django-...@googlegroups.com
#35889: Django widgets document customizing widget instances section incorrect
sentence.
-------------------------------------+-------------------------------------
Reporter: Antoliny | Owner: Antoliny
Type: | Status: assigned
Cleanup/optimization |
Component: Documentation | Version: 5.0
Severity: Normal | Resolution:
Keywords: Widget Document | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Antoliny):

Both classes inherit Input,So I think it would be okey to change TextInput
to Input.
--
Ticket URL: <https://code.djangoproject.com/ticket/35889#comment:3>
Reply all
Reply to author
Forward
0 new messages