diff --git a/rest_framework/schemas/generators.py b/rest_framework/schemas/generators.py index 736d9d419..3e927527c 100644 --- a/rest_framework/schemas/generators.py +++ b/rest_framework/schemas/generators.py @@ -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) diff --git a/tests/test_schemas.py b/tests/test_schemas.py index 786db593b..184401a86 100644 --- a/tests/test_schemas.py +++ b/tests/test_schemas.py @@ -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." )