Remove the redundant "required=True"
The django form field default is "required=True", so this patch remove the redundant "required=True" in the form. Change-Id: I3d91ae0638b69d56c1f1b72913ee4995db249007
This commit is contained in:
parent
e4e11455a6
commit
2fa872aac2
@ -212,7 +212,7 @@ class Column(html.HTMLElement):
|
||||
A form field used for inline editing of the column. A django
|
||||
forms.Field can be used or django form.Widget can be used.
|
||||
|
||||
Example: ``form_field=forms.CharField(required=True)``.
|
||||
Example: ``form_field=forms.CharField()``.
|
||||
Defaults to ``None``.
|
||||
|
||||
.. attribute:: form_field_attributes
|
||||
|
@ -134,7 +134,7 @@ class IPFieldTests(test.TestCase):
|
||||
"1111:2222::4444:5555:6666::8888",
|
||||
"1111:2222::4444:5555:6666:8888/",
|
||||
"1111:2222::4444:5555:6666::8888/130")
|
||||
ipv4 = forms.IPField(required=True, version=forms.IPv4)
|
||||
ipv4 = forms.IPField(version=forms.IPv4)
|
||||
ipv6 = forms.IPField(required=False, version=forms.IPv6)
|
||||
ipmixed = forms.IPField(required=False,
|
||||
version=forms.IPv4 | forms.IPv6)
|
||||
|
@ -274,7 +274,7 @@ class MyTable(tables.DataTable):
|
||||
name = tables.Column(get_name,
|
||||
verbose_name="Verbose Name",
|
||||
sortable=True,
|
||||
form_field=forms.CharField(required=True),
|
||||
form_field=forms.CharField(),
|
||||
form_field_attributes={'class': 'test'})
|
||||
value = tables.Column('value',
|
||||
sortable=True,
|
||||
@ -334,7 +334,7 @@ class MyTableNotAllowedInlineEdit(MyTable):
|
||||
name = tables.Column(get_name,
|
||||
verbose_name="Verbose Name",
|
||||
sortable=True,
|
||||
form_field=forms.CharField(required=True),
|
||||
form_field=forms.CharField(),
|
||||
form_field_attributes={'class': 'test'})
|
||||
|
||||
class Meta(object):
|
||||
@ -345,7 +345,7 @@ class MyTableNotAllowedInlineEdit(MyTable):
|
||||
|
||||
class MyTableWrapList(MyTable):
|
||||
name = tables.Column('name',
|
||||
form_field=forms.CharField(required=True),
|
||||
form_field=forms.CharField(),
|
||||
form_field_attributes={'class': 'test'},
|
||||
wrap_list=True)
|
||||
value = tables.Column('value',
|
||||
@ -721,7 +721,6 @@ class DataTableTests(test.TestCase):
|
||||
verbose_name="Verbose Name",
|
||||
sortable=True,
|
||||
form_field=forms.BooleanField(
|
||||
required=True,
|
||||
label="Verbose Name"),
|
||||
form_field_attributes={'class': 'test'})
|
||||
|
||||
|
@ -68,7 +68,6 @@ class Login(django_auth_forms.AuthenticationForm):
|
||||
self.fields['domain'] = forms.ChoiceField(
|
||||
label=_("Domain"),
|
||||
initial=last_domain,
|
||||
required=True,
|
||||
choices=getattr(settings,
|
||||
'OPENSTACK_KEYSTONE_DOMAIN_CHOICES',
|
||||
()))
|
||||
@ -76,7 +75,6 @@ class Login(django_auth_forms.AuthenticationForm):
|
||||
self.fields['domain'] = forms.CharField(
|
||||
initial=last_domain,
|
||||
label=_("Domain"),
|
||||
required=True,
|
||||
widget=forms.TextInput(attrs={"autofocus": "autofocus"}))
|
||||
self.fields['username'].widget = forms.widgets.TextInput()
|
||||
fields_ordering = ['domain', 'username', 'password', 'region']
|
||||
|
Loading…
Reference in New Issue
Block a user