diff --git a/docs/api-guide/authentication.md b/docs/api-guide/authentication.md index 09793efd7..c4dbe8856 100644 --- a/docs/api-guide/authentication.md +++ b/docs/api-guide/authentication.md @@ -324,7 +324,7 @@ If the `.authenticate_header()` method is not overridden, the authentication sch --- -**Note:** When your custom authenticator is invoked by the request object's `.user` or `.auth` properties, you may see an `AttributeError` re-raised as a `WrappedAttributeError`. This is necessary to prevent the original exception from being suppressed by the outer property access. Python will not recognize that the `AttributeError` orginates from your custom authenticator and will instead assume that the request object does not have a `.user` or `.auth` property. These errors should be fixed or otherwise handled by your authenticator. +**Note:** When your custom authenticator is invoked by the request object's `.user` or `.auth` properties, you may see an `AttributeError` re-raised as a `WrappedAttributeError`. This is necessary to prevent the original exception from being suppressed by the outer property access. Python will not recognize that the `AttributeError` originates from your custom authenticator and will instead assume that the request object does not have a `.user` or `.auth` property. These errors should be fixed or otherwise handled by your authenticator. --- diff --git a/docs/api-guide/permissions.md b/docs/api-guide/permissions.md index 32c04a697..25baa4813 100644 --- a/docs/api-guide/permissions.md +++ b/docs/api-guide/permissions.md @@ -286,7 +286,7 @@ The following third party packages are also available. ## DRF - Access Policy -The [Django REST - Access Policy][drf-access-policy] package provides a way to define complex access rules in declaritive policy classes that are attached to view sets or function-based views. The policies are defined in JSON in a format similar to AWS' Identity & Access Management policies. +The [Django REST - Access Policy][drf-access-policy] package provides a way to define complex access rules in declarative policy classes that are attached to view sets or function-based views. The policies are defined in JSON in a format similar to AWS' Identity & Access Management policies. ## Composed Permissions diff --git a/docs/api-guide/requests.md b/docs/api-guide/requests.md index 967303dd1..3bc083893 100644 --- a/docs/api-guide/requests.md +++ b/docs/api-guide/requests.md @@ -93,7 +93,7 @@ You won't typically need to access this property. --- -**Note:** You may see a `WrappedAttributeError` raised when calling the `.user` or `.auth` properties. These errors originate from an authenticator as a standard `AttributeError`, however it's necessary that they be re-raised as a different exception type in order to prevent them from being suppressed by the outer property access. Python will not recognize that the `AttributeError` orginates from the authenticator and will instead assume that the request object does not have a `.user` or `.auth` property. The authenticator will need to be fixed. +**Note:** You may see a `WrappedAttributeError` raised when calling the `.user` or `.auth` properties. These errors originate from an authenticator as a standard `AttributeError`, however it's necessary that they be re-raised as a different exception type in order to prevent them from being suppressed by the outer property access. Python will not recognize that the `AttributeError` originates from the authenticator and will instead assume that the request object does not have a `.user` or `.auth` property. The authenticator will need to be fixed. --- diff --git a/docs/community/third-party-packages.md b/docs/community/third-party-packages.md index cbe210866..54dec7f5e 100644 --- a/docs/community/third-party-packages.md +++ b/docs/community/third-party-packages.md @@ -55,7 +55,7 @@ We recommend using [Travis CI][travis-ci], a hosted continuous integration servi To get started with Travis CI, [sign in][travis-ci] with your GitHub account. Once you're signed in, go to your [profile page][travis-profile] and enable the service hook for the repository you want. -If you use the cookiecutter template, your project will already contain a `.travis.yml` file which Travis CI will use to build your project and run tests. By default, builds are triggered everytime you push to your repository or create Pull Request. +If you use the cookiecutter template, your project will already contain a `.travis.yml` file which Travis CI will use to build your project and run tests. By default, builds are triggered every time you push to your repository or create Pull Request. #### Uploading to PyPI diff --git a/docs/coreapi/schemas.md b/docs/coreapi/schemas.md index 21a8cae6d..6ee620343 100644 --- a/docs/coreapi/schemas.md +++ b/docs/coreapi/schemas.md @@ -480,7 +480,7 @@ An `APIView`, with an explicit method docstring. usernames = [user.username for user in User.objects.all()] return Response(usernames) -A `ViewSet`, with an explict action docstring. +A `ViewSet`, with an explicit action docstring. class ListUsernames(ViewSet): def list(self, request): diff --git a/docs/topics/documenting-your-api.md b/docs/topics/documenting-your-api.md index f663e22e4..5cdf631a6 100644 --- a/docs/topics/documenting-your-api.md +++ b/docs/topics/documenting-your-api.md @@ -12,7 +12,7 @@ There are also a number of great third-party documentation packages available. ## Generating documentation from OpenAPI schemas There are a number of packages available that allow you to generate HTML -documenation pages from OpenAPI schemas. +documentation pages from OpenAPI schemas. Two popular options are [Swagger UI][swagger-ui] and [ReDoc][redoc]. diff --git a/rest_framework/serializers.py b/rest_framework/serializers.py index 320148789..01f34298b 100644 --- a/rest_framework/serializers.py +++ b/rest_framework/serializers.py @@ -976,7 +976,7 @@ class ModelSerializer(Serializer): instance.save() # Note that many-to-many fields are set after updating instance. - # Setting m2m fields triggers signals which could potentialy change + # Setting m2m fields triggers signals which could potentially change # updated instance and we do not want it to collide with .update() for attr, value in m2m_fields: field = getattr(instance, attr) diff --git a/rest_framework/templatetags/rest_framework.py b/rest_framework/templatetags/rest_framework.py index 56e2994ea..e754c76c0 100644 --- a/rest_framework/templatetags/rest_framework.py +++ b/rest_framework/templatetags/rest_framework.py @@ -233,7 +233,7 @@ def format_value(value): def items(value): """ Simple filter to return the items of the dict. Useful when the dict may - have a key 'items' which is resolved first in Django tempalte dot-notation + have a key 'items' which is resolved first in Django template dot-notation lookup. See issue #4931 Also see: https://stackoverflow.com/questions/15416662/django-template-loop-over-dictionary-items-with-items-as-key """ diff --git a/rest_framework/viewsets.py b/rest_framework/viewsets.py index ad5633854..d94c81df4 100644 --- a/rest_framework/viewsets.py +++ b/rest_framework/viewsets.py @@ -53,7 +53,7 @@ class ViewSetMixin: and slightly modify the view function that is created and returned. """ # The name and description initkwargs may be explicitly overridden for - # certain route confiugurations. eg, names of extra actions. + # certain route configurations. eg, names of extra actions. cls.name = None cls.description = None diff --git a/tests/test_model_serializer.py b/tests/test_model_serializer.py index 4d9aff454..21ec82347 100644 --- a/tests/test_model_serializer.py +++ b/tests/test_model_serializer.py @@ -303,7 +303,7 @@ class TestRegularFieldMappings(TestCase): def test_invalid_field(self): """ Field names that do not map to a model field or relationship should - raise a configuration errror. + raise a configuration error. """ class TestSerializer(serializers.ModelSerializer): class Meta: diff --git a/tests/test_templatetags.py b/tests/test_templatetags.py index 128160888..28d6b4011 100644 --- a/tests/test_templatetags.py +++ b/tests/test_templatetags.py @@ -540,7 +540,7 @@ class SchemaLinksTests(TestCase): ] ), 'create': coreapi.Link( - url='/aniamls/cat', + url='/animals/cat', action='post', fields=[] ) @@ -589,7 +589,7 @@ class SchemaLinksTests(TestCase): ] ), 'create': coreapi.Link( - url='/aniamls/cat', + url='/animals/cat', action='post', fields=[] ) diff --git a/tests/test_utils.py b/tests/test_utils.py index 01ad47082..500c6a3fa 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -174,7 +174,7 @@ class BreadcrumbTests(TestCase): class JsonFloatTests(TestCase): """ - Internaly, wrapped json functions should adhere to strict float handling + Internally, wrapped json functions should adhere to strict float handling """ def test_dumps(self):