diff options
| author | Tom Christie | 2012-10-05 10:23:47 +0100 |
|---|---|---|
| committer | Tom Christie | 2012-10-05 10:23:47 +0100 |
| commit | d07dc77e91c1f99b47915b3cef30b565f2618e82 (patch) | |
| tree | 9f68ca55f685090f1672a557ce985931ccee47b3 /rest_framework/renderers.py | |
| parent | ad5e6eb16f4db928e1fc8d0a6af4f9f4584f7b08 (diff) | |
| download | django-rest-framework-d07dc77e91c1f99b47915b3cef30b565f2618e82.tar.bz2 | |
Accepted media type uses most specific of client/renderer media types.
Diffstat (limited to 'rest_framework/renderers.py')
| -rw-r--r-- | rest_framework/renderers.py | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/rest_framework/renderers.py b/rest_framework/renderers.py index e33fa30e..6a95815a 100644 --- a/rest_framework/renderers.py +++ b/rest_framework/renderers.py @@ -15,7 +15,7 @@ from rest_framework.request import clone_request from rest_framework.utils import dict2xml from rest_framework.utils import encoders from rest_framework.utils.breadcrumbs import get_breadcrumbs -from rest_framework.utils.mediatypes import get_media_type_params, add_media_type_param, media_type_matches +from rest_framework.utils.mediatypes import get_media_type_params, add_media_type_param from rest_framework import VERSION from rest_framework import serializers @@ -32,23 +32,6 @@ class BaseRenderer(object): def __init__(self, view=None): self.view = view - def can_handle_format(self, format): - return format == self.format - - def can_handle_media_type(self, media_type): - """ - Returns `True` if this renderer is able to deal with the given - media type. - - The default implementation for this function is to check the media type - argument against the media_type attribute set on the class to see if - they match. - - This may be overridden to provide for other behavior, but typically - you'll instead want to just set the `media_type` attribute on the class. - """ - return media_type_matches(self.media_type, media_type) - def render(self, obj=None, media_type=None): """ Given an object render it into a string. |
