aboutsummaryrefslogtreecommitdiffstats
path: root/djangorestframework/resource.py
diff options
context:
space:
mode:
authorTom Christie2011-04-11 15:03:49 +0100
committerTom Christie2011-04-11 15:03:49 +0100
commita9df917d10e5f84090074e11213eb6d550c174cc (patch)
tree7aa898b643bebf667bf461a18d479acfc7085967 /djangorestframework/resource.py
parent136c9b5271fc205abffbbe5422b3c345858a533b (diff)
downloaddjango-rest-framework-a9df917d10e5f84090074e11213eb6d550c174cc.tar.bz2
Lots of validator tests passing after refactor
Diffstat (limited to 'djangorestframework/resource.py')
-rw-r--r--djangorestframework/resource.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/djangorestframework/resource.py b/djangorestframework/resource.py
index c5faf175..02c55663 100644
--- a/djangorestframework/resource.py
+++ b/djangorestframework/resource.py
@@ -3,10 +3,9 @@ from django.views.decorators.csrf import csrf_exempt
from djangorestframework.compat import View
from djangorestframework.emitters import EmitterMixin
-from djangorestframework.validators import FormValidatorMixin
from djangorestframework.response import Response, ResponseException
from djangorestframework.request import RequestMixin, AuthMixin
-from djangorestframework import emitters, parsers, authenticators, status
+from djangorestframework import emitters, parsers, authenticators, validators, status
# TODO: Figure how out references and named urls need to work nicely
@@ -17,7 +16,7 @@ from djangorestframework import emitters, parsers, authenticators, status
__all__ = ['Resource']
-class Resource(EmitterMixin, AuthMixin, FormValidatorMixin, RequestMixin, View):
+class Resource(EmitterMixin, AuthMixin, RequestMixin, View):
"""Handles incoming requests and maps them to REST operations,
performing authentication, input deserialization, input validation, output serialization."""
@@ -38,7 +37,10 @@ class Resource(EmitterMixin, AuthMixin, FormValidatorMixin, RequestMixin, View):
parsers = ( parsers.JSONParser,
parsers.FormParser,
parsers.MultipartParser )
-
+
+ # List of validators to validate, cleanup and type-ify the request content
+ validators = (validators.FormValidator,)
+
# List of all authenticating methods to attempt.
authenticators = ( authenticators.UserLoggedInAuthenticator,
authenticators.BasicAuthenticator )