diff --git a/rest_framework/decorators.py b/rest_framework/decorators.py index 2d3bbe46f..bd62b5300 100644 --- a/rest_framework/decorators.py +++ b/rest_framework/decorators.py @@ -81,7 +81,7 @@ def api_view(http_method_names=None, exclude_from_schema=False): warnings.warn( "The `exclude_from_schema` argument to `api_view` is deprecated. " "Use the `schema` decorator instead, passing `None`.", - DeprecationWarning + DeprecationWarning, stacklevel=2 ) WrappedAPIView.exclude_from_schema = exclude_from_schema