mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-30 01:49:50 +03:00
Demonstration (in code, look at the diff) of attribute validation
This commit is contained in:
parent
c2a17ab6a3
commit
5314927b6b
|
@ -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'})
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user