def auto_delete_files(cls):
 pre_delete.connect(delete_files_for_obj, sender=cls)
 return cls

def auto_delete_files ( cls ) : pre_delete . connect ( delete_files_for_obj , sender = cls ) return cls
deletes all filefields when model instances are deleted .