3👍
✅
You can override the argument in constructor:
class TestForm(forms.Form):
def __init__(self, *args, **kwargs):
super(TestForm, self).__init__(auto_id=True, *args, **kwargs)
4👍
class TestForm(ModelForm):
def __init__(self, *args, **kwargs):
super(TestForm, self).__init__(*args, **kwargs)
self.auto_id = True
class Meta:
model = Test
👤ndpu
- [Django]-Django-storages S3Boto3Storage makes HEAD and GET requests on read
- [Django]-Django admin custom commands – passing a list of strings into args
- [Django]-Saving many Django objects with one big INSERT statement
Source:stackexchange.com