diff options
| author | Sébastien Piquemal | 2012-02-23 23:19:51 +0200 |
|---|---|---|
| committer | Sébastien Piquemal | 2012-02-23 23:19:51 +0200 |
| commit | 023c008939c81ba8c33b4344b2c7756687e3be0b (patch) | |
| tree | f95fea767787b26a9b3039d31fc2bf582f70cdb4 /examples/permissionsexample/views.py | |
| parent | afd490238a38c5445013f030547b1019f484f0bc (diff) | |
| download | django-rest-framework-023c008939c81ba8c33b4344b2c7756687e3be0b.tar.bz2 | |
fixed permissions examples + sanity test
Diffstat (limited to 'examples/permissionsexample/views.py')
| -rw-r--r-- | examples/permissionsexample/views.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/permissionsexample/views.py b/examples/permissionsexample/views.py index 13384c9f..f3dafcd4 100644 --- a/examples/permissionsexample/views.py +++ b/examples/permissionsexample/views.py @@ -30,7 +30,7 @@ class ThrottlingExampleView(View): throttle will be applied until 60 seconds have passed since the first request. """ - permissions = (PerUserThrottling,) + permissions_classes = (PerUserThrottling,) throttle = '10/min' def get(self, request): @@ -47,7 +47,7 @@ class LoggedInExampleView(View): `curl -X GET -H 'Accept: application/json' -u test:test http://localhost:8000/permissions-example` """ - permissions = (IsAuthenticated, ) + permissions_classes = (IsAuthenticated, ) def get(self, request): return Response('You have permission to view this resource') |
