МП
Size: a a a
МП
F
ИХ
T
F
T
F
T
F
N
А
class NewSizeForm(forms.Form):
width = forms.IntegerField(label='Ширина', required=False)
height = forms.IntegerField(label='Высота', required=False)
def clean(self):
width = self.cleaned_data.get('width')
height = self.cleaned_data.get('height')
if not width and not height:
raise forms.ValidationError('Укажите один из параметров')
return self.cleaned_data
S
class NewSizeForm(forms.Form):
width = forms.IntegerField(label='Ширина', required=False)
height = forms.IntegerField(label='Высота', required=False)
def clean(self):
width = self.cleaned_data.get('width')
height = self.cleaned_data.get('height')
if not width and not height:
raise forms.ValidationError('Укажите один из параметров')
return self.cleaned_data
__all__вот почитай
А
__all__вот почитай
fields = __all__ ?
S
fields = __all__ ?
S
S
А
S
А