def content_type(filename):
    """
    Takes a guess at what the desired mime type might be for the requested file.

    Mostly only useful for static media files.
    """
    ct = 'text/plain'
    ct_guess = mimetypes.guess_type(filename)

    if ct_guess[0] is not None:
        ct = ct_guess[0]

    return ct
dataset/ETHPy150Open toastdriven/itty/itty.py/content_type/original