aboutsummaryrefslogtreecommitdiffstats
path: root/djangorestframework/mixins.py
diff options
context:
space:
mode:
authorTom Christie2011-05-13 17:46:31 +0100
committerTom Christie2011-05-13 17:46:31 +0100
commit47645319c94fc536a2b3675edf8f2a02c1d11d12 (patch)
tree5e83c2c1c03d7fb1b303d735e7a8e3efb37f3ce3 /djangorestframework/mixins.py
parentc1b9af845375336b955202363f5de5ab9685448c (diff)
downloaddjango-rest-framework-47645319c94fc536a2b3675edf8f2a02c1d11d12.tar.bz2
Ensure there is always a resource attribute set
Diffstat (limited to 'djangorestframework/mixins.py')
-rw-r--r--djangorestframework/mixins.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/djangorestframework/mixins.py b/djangorestframework/mixins.py
index 70ec677e..76c2208d 100644
--- a/djangorestframework/mixins.py
+++ b/djangorestframework/mixins.py
@@ -10,6 +10,7 @@ from django.http.multipartparser import LimitBytes
from djangorestframework import status
from djangorestframework.parsers import FormParser, MultiPartParser
+from djangorestframework.resources import Resource
from djangorestframework.response import Response, ErrorResponse
from djangorestframework.utils import as_tuple, MSIE_USER_AGENT_REGEX
from djangorestframework.utils.mediatypes import is_form_media_type
@@ -444,7 +445,7 @@ class ResourceMixin(object):
It provides validation on the content of incoming requests,
and filters the object representation into a serializable object for the response.
"""
- resource = None
+ resource = Resource
@property
def CONTENT(self):