Skip to content

Commit e03166e

Browse files
committed
Support versioning_class in api_view
Mirrors encode/django-rest-framework#9719
1 parent 697ebf0 commit e03166e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

adrf/decorators.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@ def handler(self, *args, **kwargs):
7575
func, "permission_classes", APIView.permission_classes
7676
)
7777

78+
WrappedAPIView.versioning_class = getattr(
79+
func, "versioning_class", APIView.versioning_class
80+
)
81+
7882
WrappedAPIView.schema = getattr(func, "schema", APIView.schema)
7983

8084
return WrappedAPIView.as_view()

0 commit comments

Comments
 (0)