diff --git a/django_mongodb_engine/base.py b/django_mongodb_engine/base.py index 12ddd2e1..9aff1baf 100644 --- a/django_mongodb_engine/base.py +++ b/django_mongodb_engine/base.py @@ -126,7 +126,7 @@ def _value_for_db(self, value, field, field_kind, db_type, lookup): "valid ObjectId string." raise DatabaseError(msg) - # PyMongo can only process datatimes? + # PyMongo can only process datetimes? elif db_type == 'date': return datetime.datetime(value.year, value.month, value.day) elif db_type == 'time': diff --git a/django_mongodb_engine/contrib/search/fields.py b/django_mongodb_engine/contrib/search/fields.py index c75cd41d..bc6a0172 100644 --- a/django_mongodb_engine/contrib/search/fields.py +++ b/django_mongodb_engine/contrib/search/fields.py @@ -29,7 +29,7 @@ def get_db_prep_lookup(self, lookup_type, value, connection, value = ''.join(value) # When 'exact' is used we'll perform an exact_phrase query - # using the $all operator otherwhise we'll just tokenized + # using the $all operator otherwise we'll just tokenized # the value. Djangotoolbox will do the remaining checks. if lookup_type == 'exact': return {'$all': self._tokenizer.tokenize(value)} diff --git a/django_mongodb_engine/fields.py b/django_mongodb_engine/fields.py index 5c815b9d..65d716b1 100644 --- a/django_mongodb_engine/fields.py +++ b/django_mongodb_engine/fields.py @@ -114,7 +114,7 @@ def pre_save(self, model_instance, add): def _on_pre_delete(self, sender, instance, using, signal, **kwargs): """ - Deletes the files associated with this isntance. + Deletes the files associated with this instance. If versioning is enabled all versions will be deleted. """ diff --git a/django_mongodb_engine/storage.py b/django_mongodb_engine/storage.py index b742d3c1..222cf40f 100644 --- a/django_mongodb_engine/storage.py +++ b/django_mongodb_engine/storage.py @@ -26,7 +26,7 @@ class GridFSStorage(Storage): This backend aims to add a GridFS storage to upload files to using Django's file fields. - For performance, the file hirarchy is represented as a tree of + For performance, the file hierarchy is represented as a tree of MongoDB sub-collections. (One could use a flat list, but to list a directory '/this/path/' diff --git a/docs/source/topics/lists-and-dicts.rst b/docs/source/topics/lists-and-dicts.rst index 3c969a9e..8aba0f71 100644 --- a/docs/source/topics/lists-and-dicts.rst +++ b/docs/source/topics/lists-and-dicts.rst @@ -96,5 +96,5 @@ as the are required to be strings on MongoDB.) :: {u'bob' : 3, u'alice' : 42} DictFields are useful mainly for storing objects of varying shape, i.e. objects -whose structure is unknow at coding time. If all your objects have the same +whose structure is unknown at coding time. If all your objects have the same structure, you should consider using :doc:`embedded-models`. diff --git a/tests/multiple_database/tests.py b/tests/multiple_database/tests.py index 8450a682..10def86d 100644 --- a/tests/multiple_database/tests.py +++ b/tests/multiple_database/tests.py @@ -275,7 +275,7 @@ def test_o2o_separation(self): alice_profile = UserProfile.objects.using('default').get(flavor='chocolate') bob_profile = UserProfile.objects.using('other').get(flavor='crunchy frog') - # Retrive related object by descriptor. Related objects should be database-baound + # Retrive related object by descriptor. Related objects should be database-bound self.assertEqual(alice_profile.user.username, 'alice') self.assertEqual(bob_profile.user.username, 'bob') @@ -466,7 +466,7 @@ def test_db_selection(self): self.assertEqual(Book.objects.db_manager('default').all().db, 'default') def test_syncdb_selection(self): - "Synchronization behaviour is predicatable" + "Synchronization behaviour is predictable" self.assertTrue(router.allow_syncdb('default', User)) self.assertTrue(router.allow_syncdb('default', Book)) diff --git a/tests/query/tests.py b/tests/query/tests.py index 3b46deea..f938c76c 100644 --- a/tests/query/tests.py +++ b/tests/query/tests.py @@ -398,7 +398,7 @@ def test_update_with_F(self): self.assertEqual(Person.objects.get(name='john').age, 39) def test_update_with_F_and_db_column(self): - # This test is simmilar to test_update_with_F but tests + # This test is similar to test_update_with_F but tests # the update with a column that has a db_column set. john = Person.objects.create(name='john', surname='nhoj', another_age=42)