(request)
return MIMEJSON if can_json else MIMETEXT
response_mimetype -- Return a proper response mimetype, accordingly to
    what the client accepts, as available in the `HTTP_ACCEPT` header.

    request -- a HttpRequest instance.
response_mimetype -- Return a proper response mimetype, accordingly to
    what the client accepts, as available in the `HTTP_ACCEPT` header.
response_mimetype -- Return a proper response mimetype accordingly to what the client accepts as available in the HTTP_ACCEPT header .
def response_mimetype(request):
    """response_mimetype -- Return a proper response mimetype, accordingly to
    what the client accepts, as available in the `HTTP_ACCEPT` header.

    request -- a HttpRequest instance.

    """
    can_json = MIMEJSON in request.META['HTTP_ACCEPT']
    can_json |= MIMEANY in request.META['HTTP_ACCEPT']
    return MIMEJSON if can_json else MIMETEXT
def response_mimetype ( request ) : can_json = MIMEJSON in request . META [ 'HTTP_ACCEPT' ] can_json |= MIMEANY in request . META [ 'HTTP_ACCEPT' ] return MIMEJSON if can_json else MIMETEXT