def has_file_field(form):
for field in form:<EOL><INDENT>if isinstance(field, FileField):<EOL><INDENT>return True<EOL><DEDENT><DEDENT>return False<EOL>
Test whether or not a form has a FileField in it.

This is used to know whether or not we need to set enctype to
multipart/form-data.