--
Ticket URL: <https://code.djangoproject.com/ticket/32215>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* status: new => closed
* resolution: => invalid
Old description:
> On https://docs.djangoproject.com/en/3.1/topics/forms/modelforms/#topics-
> forms-modelforms
> Move comma in widget descriptor?
> it says:
> class AuthorForm(forms.Form):
> name = forms.CharField(max_length=100)
> title = forms.CharField(
> max_length=3,
> widget=forms.Select(choices=TITLE_CHOICES),
> )
> birth_date = forms.DateField(required=False)
> and I THINK should be:
> class AuthorForm(forms.Form):
> name = forms.CharField(max_length=100)
> title = forms.CharField(
> max_length=3,
> widget=forms.Select(choices=TITLE_CHOICES)
> ),
> birth_date = forms.DateField(required=False)
New description:
On https://docs.djangoproject.com/en/3.1/topics/forms/modelforms/#topics-
forms-modelforms
Move comma in widget descriptor?
it says:
{{{
class AuthorForm(forms.Form):
name = forms.CharField(max_length=100)
title = forms.CharField(
max_length=3,
widget=forms.Select(choices=TITLE_CHOICES),
)
birth_date = forms.DateField(required=False)
}}}
and I THINK should be:
{{{
class AuthorForm(forms.Form):
name = forms.CharField(max_length=100)
title = forms.CharField(
max_length=3,
widget=forms.Select(choices=TITLE_CHOICES)
),
birth_date = forms.DateField(required=False)
}}}
--
Comment:
No, it's not a typo. `title` is a form field, with your patch it will be a
tuple.
--
Ticket URL: <https://code.djangoproject.com/ticket/32215#comment:1>