diff options
| author | Tom Christie | 2012-04-11 17:38:47 +0100 |
|---|---|---|
| committer | Tom Christie | 2012-04-11 17:38:47 +0100 |
| commit | 4739e1c012526c3ed9835d908d6d7eff5e3c48f6 (patch) | |
| tree | 800f2133bf50449e2698f562d5d1d2dd199168e3 /djangorestframework/permissions.py | |
| parent | 44df8345f3ffcba141ded3a1bd993971d7199164 (diff) | |
| parent | 1ff741d1ccc38f099a7159bdef787e5c04dc4f79 (diff) | |
| download | django-rest-framework-4739e1c012526c3ed9835d908d6d7eff5e3c48f6.tar.bz2 | |
Merge work from sebpiq
Diffstat (limited to 'djangorestframework/permissions.py')
| -rw-r--r-- | djangorestframework/permissions.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/djangorestframework/permissions.py b/djangorestframework/permissions.py index 335a7213..4a2b1b00 100644 --- a/djangorestframework/permissions.py +++ b/djangorestframework/permissions.py @@ -1,7 +1,8 @@ """ -The :mod:`permissions` module bundles a set of permission classes that are used -for checking if a request passes a certain set of constraints. You can assign a permission -class to your view by setting your View's :attr:`permissions` class attribute. +The :mod:`permissions` module bundles a set of permission classes that are used +for checking if a request passes a certain set of constraints. + +Permission behavior is provided by mixing the :class:`mixins.PermissionsMixin` class into a :class:`View` class. """ from django.core.cache import cache @@ -126,7 +127,7 @@ class DjangoModelPermissions(BasePermission): try: return [perm % kwargs for perm in self.perms_map[method]] except KeyError: - ErrorResponse(status.HTTP_405_METHOD_NOT_ALLOWED) + ImmediateResponse(status.HTTP_405_METHOD_NOT_ALLOWED) def check_permission(self, user): method = self.view.method |
