Correct deprecation warning message

This commit is contained in:
Carlton Gibson 2017-09-15 14:27:21 +02:00
parent 0cd24b455f
commit 853dd233a2
2 changed files with 2 additions and 2 deletions

View File

@ -150,7 +150,7 @@ class EndpointEnumerator(object):
return False # Ignore anything except REST framework views.
if hasattr(callback.cls, 'exclude_from_schema'):
fmt = ("The `{}.exclude_from_schema` is pending deprecation. "
fmt = ("The `{}.exclude_from_schema` attribute is pending deprecation. "
"Set `schema = None` instead.")
msg = fmt.format(callback.cls.__name__)
warnings.warn(msg, PendingDeprecationWarning)

View File

@ -717,6 +717,6 @@ class SchemaGenerationExclusionTests(TestCase):
assert len(record) == 1
assert str(record[0].message) == (
"The `OldFashionedExcludedView.exclude_from_schema` is "
"The `OldFashionedExcludedView.exclude_from_schema` attribute is "
"pending deprecation. Set `schema = None` instead."
)