def image_upload_path(instance, filename): object_crm_id = instance.gallery.object.crm_id gallery_name = instance.gallery.id filename = FileProcessing(filename) # filename = filename.newFileNameTranslitSlugify() filename = filename.newFileNameGenerated() return 'objects/{object_crm_id}/galleries/{gallery_name}/{filename}'.format( object_crm_id=object_crm_id, gallery_name=gallery_name, filename=filename)
def image_upload_path(instance, filename): object_crm_id = instance.object.crm_id filename = FileProcessing(filename) filename = filename.newFileNameGenerated() return f'objects/{object_crm_id}/info-tabs/{filename}'
def slider_image_upload(instance, filename): filename = FileProcessing(filename) filename = filename.newFileNameGenerated() return f'objects-commercial/{instance.crm_id}/slider/{filename}'
def image_upload_path(instance, filename): filename = FileProcessing(filename) filename = filename.newFileNameGenerated() return f'objects-commercial/{instance.crm_id}/images/{filename}'
def image_upload_path(instance, filename): filename = FileProcessing(filename) filename = filename.newFileNameGenerated() return 'company/job/{filename}'.format(filename=filename)
def actions_image_upload_path(instance, filename): date = instance.date_start filename = FileProcessing(filename) filename = filename.newFileNameGenerated() return 'actions/{date}/{filename}'.format(date=date, filename=filename)
def image_upload_path(instance, filename): date = instance.news.date filename = FileProcessing(filename) filename = filename.newFileNameGenerated() return 'news/{date}/{filename}'.format(date=date, filename=filename)