https://www.chicagodjango.com/blog/django-form-snippets/
方法是init
class MyForm2(forms.ModelForm): def __init__(self, *args, **kwargs): super(MyForm2, self).__init__(*args, **kwargs)
赞