Exemple #1
0
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)
Exemple #2
0
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}'
Exemple #3
0
def slider_image_upload(instance, filename):
    filename = FileProcessing(filename)
    filename = filename.newFileNameGenerated()
    return f'objects-commercial/{instance.crm_id}/slider/{filename}'
Exemple #4
0
def image_upload_path(instance, filename):
    filename = FileProcessing(filename)
    filename = filename.newFileNameGenerated()
    return f'objects-commercial/{instance.crm_id}/images/{filename}'
Exemple #5
0
def image_upload_path(instance, filename):
    filename = FileProcessing(filename)
    filename = filename.newFileNameGenerated()
    return 'company/job/{filename}'.format(filename=filename)
Exemple #6
0
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)
Exemple #7
0
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)