예제 #1
0
def file_upload_path(instance, filename):
    object_crm_id = instance.object.crm_id
    filename = FileProcessing(filename)
    filename = filename.newFileNameTranslitSlugify()
    # filename = filename.newFileNameFromField(instance.title)
    return 'objects/{object_crm_id}/documents/{filename}'.format(
        object_crm_id=object_crm_id, filename=filename)
예제 #2
0
def file_upload_path(instance, filename):
    tender_id = instance.tender.id
    filename = FileProcessing(filename)
    filename = filename.newFileNameTranslitSlugify()
    return 'company/tenders/{tender_id}/{filename}'.format(tender_id=tender_id,
                                                           filename=filename)
예제 #3
0
def file_upload_path(instance, filename):
    filename = FileProcessing(filename)
    filename = filename.newFileNameTranslitSlugify()
    return f'objects/{instance.object.crm_id}/files/{filename}'