summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorДилян Палаузов <dilyanpalauzov@users.noreply.github.com>2017-11-06 22:11:39 -0500
committerTim Graham <timograham@gmail.com>2017-11-06 22:41:23 -0500
commite68baf386219ab64539ba5cef628811be03fdb84 (patch)
treec91ea8f0b79ba3a9edc66db32c3ed18ea6ebf837 /django
parentbcaef2c91d234fe742973eb7df8a47f2048d3e63 (diff)
[2.0.x] Fixed #28776 -- Fixed a/an/and typos in docs and comments.
Backport of 6c0042430e3618ce5c276d195d92a6b884daa3a3 from master
Diffstat (limited to 'django')
-rw-r--r--django/contrib/contenttypes/views.py2
-rw-r--r--django/contrib/staticfiles/finders.py2
-rw-r--r--django/core/files/uploadedfile.py2
-rw-r--r--django/core/mail/backends/filebased.py2
-rw-r--r--django/core/management/commands/loaddata.py2
-rw-r--r--django/db/models/fields/related_lookups.py2
-rw-r--r--django/http/response.py2
-rw-r--r--django/shortcuts.py4
-rw-r--r--django/views/generic/edit.py2
9 files changed, 10 insertions, 10 deletions
diff --git a/django/contrib/contenttypes/views.py b/django/contrib/contenttypes/views.py
index d67f071569..cdbc58fa3f 100644
--- a/django/contrib/contenttypes/views.py
+++ b/django/contrib/contenttypes/views.py
@@ -50,7 +50,7 @@ def shortcut(request, content_type_id, object_id):
opts = obj._meta
- # First, look for an many-to-many relationship to Site.
+ # First, look for a many-to-many relationship to Site.
for field in opts.many_to_many:
if field.remote_field.model is Site:
try:
diff --git a/django/contrib/staticfiles/finders.py b/django/contrib/staticfiles/finders.py
index 2fbd0763f5..afce4ca637 100644
--- a/django/contrib/staticfiles/finders.py
+++ b/django/contrib/staticfiles/finders.py
@@ -204,7 +204,7 @@ class BaseStorageFinder(BaseFinder):
raise ImproperlyConfigured("The staticfiles storage finder %r "
"doesn't have a storage class "
"assigned." % self.__class__)
- # Make sure we have an storage instance here.
+ # Make sure we have a storage instance here.
if not isinstance(self.storage, (Storage, LazyObject)):
self.storage = self.storage()
super().__init__(*args, **kwargs)
diff --git a/django/core/files/uploadedfile.py b/django/core/files/uploadedfile.py
index 3ba7f995c6..8f1d26ea5f 100644
--- a/django/core/files/uploadedfile.py
+++ b/django/core/files/uploadedfile.py
@@ -15,7 +15,7 @@ __all__ = ('UploadedFile', 'TemporaryUploadedFile', 'InMemoryUploadedFile',
class UploadedFile(File):
"""
- A abstract uploaded file (``TemporaryUploadedFile`` and
+ An abstract uploaded file (``TemporaryUploadedFile`` and
``InMemoryUploadedFile`` are the built-in concrete subclasses).
An ``UploadedFile`` object behaves somewhat like a file object and
diff --git a/django/core/mail/backends/filebased.py b/django/core/mail/backends/filebased.py
index 2d1238665e..ddcd9ed97b 100644
--- a/django/core/mail/backends/filebased.py
+++ b/django/core/mail/backends/filebased.py
@@ -21,7 +21,7 @@ class EmailBackend(ConsoleEmailBackend):
if not isinstance(self.file_path, str):
raise ImproperlyConfigured('Path for saving emails is invalid: %r' % self.file_path)
self.file_path = os.path.abspath(self.file_path)
- # Make sure that self.file_path is an directory if it exists.
+ # Make sure that self.file_path is a directory if it exists.
if os.path.exists(self.file_path) and not os.path.isdir(self.file_path):
raise ImproperlyConfigured(
'Path for saving email messages exists, but is not a directory: %s' % self.file_path
diff --git a/django/core/management/commands/loaddata.py b/django/core/management/commands/loaddata.py
index 786957e86f..bed6be14e4 100644
--- a/django/core/management/commands/loaddata.py
+++ b/django/core/management/commands/loaddata.py
@@ -72,7 +72,7 @@ class Command(BaseCommand):
self.loaddata(fixture_labels)
# Close the DB connection -- unless we're still in a transaction. This
- # is required as a workaround for an edge case in MySQL: if the same
+ # is required as a workaround for an edge case in MySQL: if the same
# connection is used to create tables, load data, and query, the query
# can return incorrect results. See Django #7572, MySQL #37735.
if transaction.get_autocommit(self.using):
diff --git a/django/db/models/fields/related_lookups.py b/django/db/models/fields/related_lookups.py
index 706e37a6bd..12f7fb0b9b 100644
--- a/django/db/models/fields/related_lookups.py
+++ b/django/db/models/fields/related_lookups.py
@@ -63,7 +63,7 @@ class RelatedIn(In):
if isinstance(self.lhs, MultiColSource):
# For multicolumn lookups we need to build a multicolumn where clause.
# This clause is either a SubqueryConstraint (for values that need to be compiled to
- # SQL) or a OR-combined list of (col1 = val1 AND col2 = val2 AND ...) clauses.
+ # SQL) or an OR-combined list of (col1 = val1 AND col2 = val2 AND ...) clauses.
from django.db.models.sql.where import WhereNode, SubqueryConstraint, AND, OR
root_constraint = WhereNode(connector=OR)
diff --git a/django/http/response.py b/django/http/response.py
index 1083fd7dca..ae14333053 100644
--- a/django/http/response.py
+++ b/django/http/response.py
@@ -489,7 +489,7 @@ class JsonResponse(HttpResponse):
:param data: Data to be dumped into json. By default only ``dict`` objects
are allowed to be passed due to a security flaw before EcmaScript 5. See
the ``safe`` parameter for more information.
- :param encoder: Should be an json encoder class. Defaults to
+ :param encoder: Should be a json encoder class. Defaults to
``django.core.serializers.json.DjangoJSONEncoder``.
:param safe: Controls if only ``dict`` objects may be serialized. Defaults
to ``True``.
diff --git a/django/shortcuts.py b/django/shortcuts.py
index 6fe3d2d590..919abccc45 100644
--- a/django/shortcuts.py
+++ b/django/shortcuts.py
@@ -79,8 +79,8 @@ def get_object_or_404(klass, *args, **kwargs):
klass may be a Model, Manager, or QuerySet object. All other passed
arguments and keyword arguments are used in the get() query.
- Note: Like with get(), an MultipleObjectsReturned will be raised if more than one
- object is found.
+ Like with QuerySet.get(), MultipleObjectsReturned is raised if more than
+ one object is found.
"""
queryset = _get_queryset(klass)
try:
diff --git a/django/views/generic/edit.py b/django/views/generic/edit.py
index ad2f2b1c67..6c840a315a 100644
--- a/django/views/generic/edit.py
+++ b/django/views/generic/edit.py
@@ -159,7 +159,7 @@ class FormView(TemplateResponseMixin, BaseFormView):
class BaseCreateView(ModelFormMixin, ProcessFormView):
"""
- Base view for creating an new object instance.
+ Base view for creating a new object instance.
Using this base class requires subclassing to provide a response mixin.
"""