From 84f775803994ccd82671dd4a6f9b4d87aa36dc31 Mon Sep 17 00:00:00 2001 From: Tom Christie Date: Fri, 28 Sep 2012 11:53:51 +0100 Subject: Remove support for doctests --- rest_framework/renderers.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'rest_framework/renderers.py') diff --git a/rest_framework/renderers.py b/rest_framework/renderers.py index 35a2a733..8f2a3570 100644 --- a/rest_framework/renderers.py +++ b/rest_framework/renderers.py @@ -5,13 +5,13 @@ Django REST framework also provides HTML and PlainText renderers that help self- by serializing the output along with documentation regarding the View, output status and headers, and providing forms and links depending on the allowed methods, renderers and parsers on the View. """ -import copy import string from django import forms from django.template import RequestContext, loader from django.utils import simplejson as json from rest_framework.compat import yaml from rest_framework.settings import api_settings +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 @@ -227,12 +227,9 @@ class DocumentingHTMLRenderer(BaseRenderer): if not api_settings.FORM_METHOD_OVERRIDE: return # Cannot use form overloading - temp = request._method - request._method = method.upper() + request = clone_request(request, method) if not view.has_permission(request): - request._method = temp return # Don't have permission - request._method = temp if method == 'DELETE' or method == 'OPTIONS': return True # Don't actually need to return a form -- cgit v1.2.3