This commit is contained in:
k4ml 2013-10-02 19:38:56 -07:00
commit 5acfefa1ac

View File

@ -12,7 +12,7 @@ from rest_framework.views import APIView
import types import types
def api_view(http_method_names): def api_view(http_method_names, view_class=APIView):
""" """
Decorator that converts a function-based view into an APIView subclass. Decorator that converts a function-based view into an APIView subclass.
@ -23,7 +23,7 @@ def api_view(http_method_names):
WrappedAPIView = type( WrappedAPIView = type(
six.PY3 and 'WrappedAPIView' or b'WrappedAPIView', six.PY3 and 'WrappedAPIView' or b'WrappedAPIView',
(APIView,), (view_class,),
{'__doc__': func.__doc__} {'__doc__': func.__doc__}
) )