def actions_partner_logo_upload_path(instance, filename): filename = FileProcessing(filename) if instance.name: filename = filename.newFileNameFromField(instance.name, 'logo', None) return 'actions-partners/{filename}'.format(filename=filename) else: # TODO: Show message pass
def logo_upload_path(instance, filename): filename = FileProcessing(filename) filename = filename.newFileNameFromField(instance.name, None, 'logo') return 'mortgage/banks/{filename}'.format(filename=filename)