aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/viewsets.py
diff options
context:
space:
mode:
authorTom Christie2013-04-04 21:42:26 +0100
committerTom Christie2013-04-04 21:42:26 +0100
commitf68721ade8d66806296323116ff9a61773ad2be1 (patch)
treed9f44f935ad338f7accb9500383c15bf30bc3621 /rest_framework/viewsets.py
parent9e24db022cd8da1a588dd43e6239e07798881c02 (diff)
downloaddjango-rest-framework-f68721ade8d66806296323116ff9a61773ad2be1.tar.bz2
Factor view names/descriptions out of View class
Diffstat (limited to 'rest_framework/viewsets.py')
-rw-r--r--rest_framework/viewsets.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/rest_framework/viewsets.py b/rest_framework/viewsets.py
index 887a9722..0818c0d9 100644
--- a/rest_framework/viewsets.py
+++ b/rest_framework/viewsets.py
@@ -15,9 +15,10 @@ class ViewSetMixin(object):
view = MyViewSet.as_view({'get': 'list', 'post': 'create'})
"""
+ _is_viewset = True
@classonlymethod
- def as_view(cls, actions=None, **initkwargs):
+ def as_view(cls, actions=None, name_suffix=None, **initkwargs):
"""
Main entry point for a request-response process.
@@ -57,6 +58,8 @@ class ViewSetMixin(object):
# and possible attributes set by decorators
# like csrf_exempt from dispatch
update_wrapper(view, cls.dispatch, assigned=())
+
+ view.cls = cls
return view