def model_file_fields(self, model):
for field in model._meta.fields:<EOL><INDENT>if isinstance(field, models.FileField):<EOL><INDENT>yield field<EOL><DEDENT><DEDENT>
Generator yielding all instances of FileField and its subclasses of a model.