def delete_file_pre_delete_mem(sender, instance, *args, **kwargs): if instance.mem_file: delete_file(instance.mem_file.path) if instance.compo_file: delete_file(instance.compo_file.path) if instance.other_file: delete_file(instance.other_file.path)
def delete_file_pre_delete_ff(sender, instance, *args, **kwargs): if instance.ff_file: delete_file(instance.ff_file.path) if instance.mdp_file: delete_file(instance.mdp_file.path)
def delete_file_pre_delete_prop(sender, instance, *args, **kwargs): if instance.data_file: delete_file(instance.data_file.path)
def delete_file_pre_delete_top(sender, instance, *args, **kwargs): if instance.itp_file: delete_file(instance.itp_file.path) if instance.gro_file: delete_file(instance.gro_file.path)
def delete_file_pre_delete_lip(sender, instance, *args, **kwargs): if instance.img: delete_file(instance.img.path)