mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-30 18:09:59 +03:00
Use stacklevel=2 with exclude_from_schema DeprecationWarning
This commit is contained in:
parent
6522d4ae20
commit
ff916f02bc
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user