def _get_name_from_accept(self, request):
        """ Process the Accept HTTP header.

        Find the most suitable mapper that the client wants and we support.

        :returns: the preferred mapper based on the accept header or ``None``.
        """

        accepts = util.parse_accept_header(request.META.get("HTTP_ACCEPT", ""))
        if not accepts:
            return None

        for accept in accepts:
            if accept[0] in self._datamappers:
                return accept[0]
        raise errors.NotAcceptable()
dataset/ETHPy150Open wuher/devil/devil/datamapper.py/DataMapperManager._get_name_from_accept/original