This commit is contained in:
Min ho Kim 2019-07-26 03:04:01 +10:00 committed by Ryan P Kilby
parent ca727872c8
commit 0e1c5d3132
12 changed files with 13 additions and 13 deletions

View File

@ -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.
---

View File

@ -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

View File

@ -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.
---

View File

@ -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):

View File

@ -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].

View File

@ -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)

View File

@ -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
"""

View File

@ -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

View File

@ -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:

View File

@ -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=[]
)

View File

@ -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):