Commit 47645319 by Tom Christie

Ensure there is always a resource attribute set

parent c1b9af84
...@@ -10,6 +10,7 @@ from django.http.multipartparser import LimitBytes ...@@ -10,6 +10,7 @@ from django.http.multipartparser import LimitBytes
from djangorestframework import status from djangorestframework import status
from djangorestframework.parsers import FormParser, MultiPartParser from djangorestframework.parsers import FormParser, MultiPartParser
from djangorestframework.resources import Resource
from djangorestframework.response import Response, ErrorResponse from djangorestframework.response import Response, ErrorResponse
from djangorestframework.utils import as_tuple, MSIE_USER_AGENT_REGEX from djangorestframework.utils import as_tuple, MSIE_USER_AGENT_REGEX
from djangorestframework.utils.mediatypes import is_form_media_type from djangorestframework.utils.mediatypes import is_form_media_type
...@@ -444,7 +445,7 @@ class ResourceMixin(object): ...@@ -444,7 +445,7 @@ class ResourceMixin(object):
It provides validation on the content of incoming requests, It provides validation on the content of incoming requests,
and filters the object representation into a serializable object for the response. and filters the object representation into a serializable object for the response.
""" """
resource = None resource = Resource
@property @property
def CONTENT(self): def CONTENT(self):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment