aboutsummaryrefslogtreecommitdiffstats
path: root/djangorestframework/views.py
diff options
context:
space:
mode:
authorBen Timby2012-01-24 14:11:10 -0500
committerBen Timby2012-01-24 14:11:10 -0500
commit049d417ebc2c88b6aeed7946efdb3baeab9a4432 (patch)
treee50d5e502519c8e41bc7e82a47c8709c83340caf /djangorestframework/views.py
parent7fa3a214fbd33dac61d3f8836e2c4aeda3149647 (diff)
downloaddjango-rest-framework-049d417ebc2c88b6aeed7946efdb3baeab9a4432.tar.bz2
Reverted formatting
Diffstat (limited to 'djangorestframework/views.py')
-rw-r--r--djangorestframework/views.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/djangorestframework/views.py b/djangorestframework/views.py
index 9dd84bf2..d89c2afd 100644
--- a/djangorestframework/views.py
+++ b/djangorestframework/views.py
@@ -27,7 +27,6 @@ __all__ = (
)
-
class View(ResourceMixin, RequestMixin, ResponseMixin, AuthMixin, DjangoView):
"""
Handles incoming requests and maps them to REST operations.
@@ -50,13 +49,13 @@ class View(ResourceMixin, RequestMixin, ResponseMixin, AuthMixin, DjangoView):
List of parsers the resource can parse the request with.
"""
- authentication = ( authentication.UserLoggedInAuthentication,
- authentication.BasicAuthentication )
+ authentication = (authentication.UserLoggedInAuthentication,
+ authentication.BasicAuthentication)
"""
List of all authenticating methods to attempt.
"""
- permissions = ( permissions.FullAnonAccess, )
+ permissions = (permissions.FullAnonAccess,)
"""
List of all permissions that must be checked.
"""
@@ -240,18 +239,21 @@ class ModelView(View):
"""
resource = resources.ModelResource
+
class InstanceModelView(InstanceMixin, ReadModelMixin, UpdateModelMixin, DeleteModelMixin, ModelView):
"""
A view which provides default operations for read/update/delete against a model instance.
"""
_suffix = 'Instance'
+
class ListModelView(ListModelMixin, ModelView):
"""
A view which provides default operations for list, against a model in the database.
"""
_suffix = 'List'
+
class ListOrCreateModelView(ListModelMixin, CreateModelMixin, ModelView):
"""
A view which provides default operations for list and create, against a model in the database.