Skip to content

Commit a8daa2e

Browse files
committed
Fixed a few typos in the docs
1 parent a679192 commit a8daa2e

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

docs/source/topics/gridfs.rst

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,21 +38,25 @@ Use :class:`~django_mongodb_engine.fields.GridFSField` to store "nameless" blobs
3838
besides documents that would normally go into the document itself.
3939

4040
All that's kept in the document is a reference (an ObjectId) to the GridFS blobs
41-
which is retrieved on demand.
41+
which are retrieved on demand.
4242

4343
Assuming you want to store a 10MiB blob "in" each document, this is what you
4444
*shouldn't* do::
4545

46+
# DON'T DO THIS
4647
class Bad(models.Model):
47-
# DON'T DO THIS
48+
blob = models.TextField()
49+
50+
# NEITHER THIS
51+
class EventWorse(models.Model):
4852
blob = models.CharField(max_length=10*1024*1024)
4953

5054
Instead, use :class:`~django_mongodb_engine.fields.GridFSField`::
5155

5256
class Better(models.Model):
5357
blob = GridFSField()
5458

55-
A GridFSField may be feeded with anything that PyMongo can handle, that is,
59+
A GridFSField may be fed with anything that PyMongo can handle, that is,
5660
(preferably) file-like objects and strings.
5761

5862
You'll always get a :class:`~gridfs.grid_file.GridOut` for documents from the

docs/source/tutorial.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ and excluding data.
2626
Perhaps a good way to get used to non-relational style data modeling is to ask
2727
yourself "What would I never do in SQL".
2828

29-
Because most relational databases lack proper list data structures you
30-
may typically model the Posts ⇔ Tags ⇔ Comments relationship using three
31-
models/tables, one table one table per entity type.
29+
Because most relational databases lack proper list data structures you may
30+
typically model the Posts ⇔ Tags ⇔ Comments relationship using three
31+
models/tables, one table per entity type.
3232

3333
Organizing your data using multiple relationships is the exact opposite of what
3434
we will do for our non-relational data model: Have one single collection (table)

0 commit comments

Comments
 (0)