Skip to content

Fix typos #6835

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 25, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/api-guide/authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

---

Expand Down
2 changes: 1 addition & 1 deletion docs/api-guide/permissions.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion docs/api-guide/requests.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

---

Expand Down
2 changes: 1 addition & 1 deletion docs/community/third-party-packages.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion docs/coreapi/schemas.md
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion docs/topics/documenting-your-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -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].

Expand Down
2 changes: 1 addition & 1 deletion rest_framework/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -976,7 +976,7 @@ def update(self, instance, validated_data):
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)
Expand Down
2 changes: 1 addition & 1 deletion rest_framework/templatetags/rest_framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
"""
Expand Down
2 changes: 1 addition & 1 deletion rest_framework/viewsets.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def as_view(cls, actions=None, **initkwargs):
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

Expand Down
2 changes: 1 addition & 1 deletion tests/test_model_serializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ class Meta:
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:
Expand Down
4 changes: 2 additions & 2 deletions tests/test_templatetags.py
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ def test_multiple_nested_routes(self):
]
),
'create': coreapi.Link(
url='/aniamls/cat',
url='/animals/cat',
action='post',
fields=[]
)
Expand Down Expand Up @@ -589,7 +589,7 @@ def test_multiple_resources_with_multiple_nested_routes(self):
]
),
'create': coreapi.Link(
url='/aniamls/cat',
url='/animals/cat',
action='post',
fields=[]
)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ def test_modelviewset_action_suffix_kwarg(self):

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):
Expand Down