aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework
diff options
context:
space:
mode:
Diffstat (limited to 'rest_framework')
-rw-r--r--rest_framework/compat.py2
-rw-r--r--rest_framework/fields.py12
-rw-r--r--rest_framework/relations.py2
-rw-r--r--rest_framework/validators.py2
-rw-r--r--rest_framework/views.py2
5 files changed, 10 insertions, 10 deletions
diff --git a/rest_framework/compat.py b/rest_framework/compat.py
index 3993cee6..e4e69580 100644
--- a/rest_framework/compat.py
+++ b/rest_framework/compat.py
@@ -131,7 +131,7 @@ else:
self.message = kwargs.pop('message', self.message)
super(MaxValueValidator, self).__init__(*args, **kwargs)
-# URLValidator only accept `message` in 1.6+
+# URLValidator only accepts `message` in 1.6+
if django.VERSION >= (1, 6):
from django.core.validators import URLValidator
else:
diff --git a/rest_framework/fields.py b/rest_framework/fields.py
index f3ff2233..bba8ccae 100644
--- a/rest_framework/fields.py
+++ b/rest_framework/fields.py
@@ -186,14 +186,14 @@ class Field(object):
def get_initial(self):
"""
- Return a value to use when the field is being returned as a primative
+ Return a value to use when the field is being returned as a primitive
value, without any object instance.
"""
return self.initial
def get_value(self, dictionary):
"""
- Given the *incoming* primative data, return the value for this field
+ Given the *incoming* primitive data, return the value for this field
that should be validated and transformed to a native value.
"""
if html.is_html_input(dictionary):
@@ -205,7 +205,7 @@ class Field(object):
def get_field_representation(self, instance):
"""
- Given the outgoing object instance, return the primative value
+ Given the outgoing object instance, return the primitive value
that should be used for this field.
"""
attribute = get_attribute(instance, self.source_attrs)
@@ -274,13 +274,13 @@ class Field(object):
def to_internal_value(self, data):
"""
- Transform the *incoming* primative data into a native value.
+ Transform the *incoming* primitive data into a native value.
"""
raise NotImplementedError('to_internal_value() must be implemented.')
def to_representation(self, value):
"""
- Transform the *outgoing* native value into primative data.
+ Transform the *outgoing* native value into primitive data.
"""
raise NotImplementedError('to_representation() must be implemented.')
@@ -928,7 +928,7 @@ class ImageField(FileField):
def to_internal_value(self, data):
# Image validation is a bit grungy, so we'll just outright
# defer to Django's implementation so we don't need to
- # consider it, or treat PIL as a test dependancy.
+ # consider it, or treat PIL as a test dependency.
file_object = super(ImageField, self).to_internal_value(data)
django_field = self._DjangoImageField()
django_field.error_messages = self.error_messages
diff --git a/rest_framework/relations.py b/rest_framework/relations.py
index 8c135672..8141de13 100644
--- a/rest_framework/relations.py
+++ b/rest_framework/relations.py
@@ -100,7 +100,7 @@ class HyperlinkedRelatedField(RelatedField):
self.lookup_url_kwarg = kwargs.pop('lookup_url_kwarg', self.lookup_field)
self.format = kwargs.pop('format', None)
- # We include these simply for dependancy injection in tests.
+ # We include these simply for dependency injection in tests.
# We can't add them as class attributes or they would expect an
# implict `self` argument to be passed.
self.reverse = reverse
diff --git a/rest_framework/validators.py b/rest_framework/validators.py
index 20de4b42..5bb69ad8 100644
--- a/rest_framework/validators.py
+++ b/rest_framework/validators.py
@@ -2,7 +2,7 @@
We perform uniqueness checks explicitly on the serializer class, rather
the using Django's `.full_clean()`.
-This gives us better seperation of concerns, allows us to use single-step
+This gives us better separation of concerns, allows us to use single-step
object creation, and makes it possible to switch between using the implicit
`ModelSerializer` class and an equivelent explicit `Serializer` class.
"""
diff --git a/rest_framework/views.py b/rest_framework/views.py
index 835e223a..979229eb 100644
--- a/rest_framework/views.py
+++ b/rest_framework/views.py
@@ -100,7 +100,7 @@ class APIView(View):
content_negotiation_class = api_settings.DEFAULT_CONTENT_NEGOTIATION_CLASS
metadata_class = api_settings.DEFAULT_METADATA_CLASS
- # Allow dependancy injection of other settings to make testing easier.
+ # Allow dependency injection of other settings to make testing easier.
settings = api_settings
@classmethod