def serve_static_file(request, filename, root=MEDIA_ROOT, force_content_type=None):
    file_contents = static_file(filename, root)

    if force_content_type is None:
        ct = content_type(filename)
    else:
        ct = force_content_type

    return Response(file_contents, content_type=ct)


# Decorators
Basic handler for serving up static media files.
dataset/ETHPy150Open toastdriven/itty/itty.py/serve_static_file