From 5314927b6b12e9dcfb1c09f18392f44b8b98e365 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20T=C3=B6rnqvist?= Date: Sun, 19 May 2013 18:04:17 +0300 Subject: [PATCH] Demonstration (in code, look at the diff) of attribute validation --- rest_framework/tests/views.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rest_framework/tests/views.py b/rest_framework/tests/views.py index 994cf6dc3..eb0a78f65 100644 --- a/rest_framework/tests/views.py +++ b/rest_framework/tests/views.py @@ -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'})