mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-26 11:33:59 +03:00
Fix some typos.
This commit is contained in:
parent
b6c90c0d68
commit
4d90bb4af4
|
@ -43,7 +43,7 @@ class Field(object):
|
||||||
Called to set up a field prior to field_to_native or field_from_native.
|
Called to set up a field prior to field_to_native or field_from_native.
|
||||||
|
|
||||||
parent - The parent serializer.
|
parent - The parent serializer.
|
||||||
model_field - The model field this field corrosponds to, if one exists.
|
model_field - The model field this field corresponds to, if one exists.
|
||||||
"""
|
"""
|
||||||
self.parent = parent
|
self.parent = parent
|
||||||
self.root = parent.root or parent
|
self.root = parent.root or parent
|
||||||
|
@ -197,7 +197,7 @@ class WritableField(Field):
|
||||||
|
|
||||||
class ModelField(WritableField):
|
class ModelField(WritableField):
|
||||||
"""
|
"""
|
||||||
A generic field that can be used against an arbirtrary model field.
|
A generic field that can be used against an arbitrary model field.
|
||||||
"""
|
"""
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
"""
|
"""
|
||||||
Generic views that provide commmonly needed behaviour.
|
Generic views that provide commonly needed behaviour.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from rest_framework import views, mixins
|
from rest_framework import views, mixins
|
||||||
|
|
|
@ -279,7 +279,7 @@ class BaseSerializer(Field):
|
||||||
def errors(self):
|
def errors(self):
|
||||||
"""
|
"""
|
||||||
Run deserialization and return error data,
|
Run deserialization and return error data,
|
||||||
setting self.object if no errors occured.
|
setting self.object if no errors occurred.
|
||||||
"""
|
"""
|
||||||
if self._errors is None:
|
if self._errors is None:
|
||||||
obj = self.from_native(self.init_data)
|
obj = self.from_native(self.init_data)
|
||||||
|
|
|
@ -16,7 +16,7 @@ class BaseThrottle(object):
|
||||||
|
|
||||||
def wait(self):
|
def wait(self):
|
||||||
"""
|
"""
|
||||||
Optionally, return a recommeded number of seconds to wait before
|
Optionally, return a recommended number of seconds to wait before
|
||||||
the next request.
|
the next request.
|
||||||
"""
|
"""
|
||||||
return None
|
return None
|
||||||
|
|
|
@ -218,7 +218,7 @@ class APIView(View):
|
||||||
|
|
||||||
def get_throttles(self):
|
def get_throttles(self):
|
||||||
"""
|
"""
|
||||||
Instantiates and returns the list of thottles that this view uses.
|
Instantiates and returns the list of throttles that this view uses.
|
||||||
"""
|
"""
|
||||||
return [throttle() for throttle in self.throttle_classes]
|
return [throttle() for throttle in self.throttle_classes]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user