Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(8)  |  Call(8)  |  Derive(0)  |  Import(0)

src/d/j/django-conneg-0.9.5/django_conneg/conneg.py   django-conneg(Download)
        elif accept_header:
            accepts = MediaType.parse_accept_header(accept_header)
            renderers = MediaType.resolve(accepts, self.renderers)
        elif default_format:
            renderers = self.renderers_by_format[default_format]

src/d/j/django-conneg-HEAD/django_conneg/conneg.py   django-conneg(Download)
        elif accept_header:
            accepts = MediaType.parse_accept_header(accept_header)
            renderers = MediaType.resolve(accepts, self.renderers)
        elif default_format:
            renderers = self.renderers_by_format[default_format]

src/h/u/humfrey-0.3.9/humfrey/desc/views.py   humfrey(Download)
 
        accepts = self.parse_accept_header(request.META.get('HTTP_ACCEPT', ''))
        renderers = MediaType.resolve(accepts, (renderer,) + view._renderers)
 
        return renderers and renderers[0] is should_redirect

src/h/u/humfrey-HEAD/humfrey/desc/views.py   humfrey(Download)
 
        accepts = self.parse_accept_header(request.META.get('HTTP_ACCEPT', ''))
        renderers = MediaType.resolve(accepts, (renderer,) + view.conneg.renderers)
 
        return renderers and renderers[0] is should_redirect

src/d/j/django-conneg-0.9.5/django_conneg/tests/priorities.py   django-conneg(Download)
            renderers = tuple(self.getRenderer(str(i), mimetype, str(i), -i) for i, mimetype in enumerate(mimetypes))
 
            renderers = http.MediaType.resolve(accept, renderers)
 
            for renderer, mimetype in zip(renderers, mimetypes):
            priorities = dict((mimetype, -i) for i, mimetype in enumerate(mimetypes))
            test_view = self.getTestView(priorities).as_view()
            renderers = http.MediaType.resolve(accept, test_view.conneg.renderers)
 
            for renderer, mimetype in zip(renderers, mimetypes):

src/d/j/django-conneg-HEAD/django_conneg/tests/priorities.py   django-conneg(Download)
            renderers = tuple(self.getRenderer(str(i), mimetype, str(i), -i) for i, mimetype in enumerate(mimetypes))
 
            renderers = http.MediaType.resolve(accept, renderers)
 
            for renderer, mimetype in zip(renderers, mimetypes):
            priorities = dict((mimetype, -i) for i, mimetype in enumerate(mimetypes))
            test_view = self.getTestView(priorities).as_view()
            renderers = http.MediaType.resolve(accept, test_view.conneg.renderers)
 
            for renderer, mimetype in zip(renderers, mimetypes):