

def project_image(request, snapshot):
    project = Domain.get(snapshot)
    if project.image_path:
        image = project.fetch_attachment(project.image_path)
        return HttpResponse(image, content_type=project.image_type)
    else:
        raise Http404()

dataset/ETHPy150Open dimagi/commcare-hq/corehq/apps/appstore/views.py project_image/original