Demonstration (in code, look at the diff) of attribute validation

This commit is contained in:
Markus Törnqvist 2013-05-19 18:04:17 +03:00
parent c2a17ab6a3
commit 5314927b6b

View File

@ -12,6 +12,10 @@ factory = RequestFactory()
class BasicView(APIView):
## Uncomment this to see how attribute validation works
# valid_attributes = ('foo', )
# foo = 'foo'
# bar = 'bar'
def get(self, request, *args, **kwargs):
return Response({'method': 'GET'})