Exemple #1
0
def sample_frame_upload_path(instance, filename):
    model = instance.solution.content_object._meta.model_name
    user = instance.solution.content_object.user \
        if model == u'image' \
        else instance.solution.content_object.image.user
    return upload_path('sample_frames', user.pk, filename)
Exemple #2
0
def image_upload_path(instance, filename):
    return upload_path('equipment_item_images', instance.created_by.pk if instance.created_by else 0, filename)
Exemple #3
0
def ckeditor_upload_path(instance, filename):
    return upload_path('ckeditor-files', instance.user.pk, filename)
def logo_upload_path(instance, filename):
    return upload_path('equipment_retailer_logos',
                       instance.created_by.pk if instance.created_by else 0,
                       filename)