[Answered ]-Django forms – object has no attribute error when trying to reference one of the form fields

1👍

Well this because behind the scene form saves the bound fields using __getitem__.

So to access correctly the bound field:

form["file_name"]

If you want to access the field:

form.fields["file_name"]

Leave a comment