[Answered ]-Django – how to set forms.FileField name

2👍

The name attribute in the HTML is the same as the name in the form definition so if you don’t want it to be file_field then don’t call it file_field.

class MyAdminForm(forms.ModelForm):
    new_field = forms.FileField()
    # Rest of the form goes here

Leave a comment