Skip to content

Commit 158ff3d

Browse files
committed
feedback
1 parent b81892b commit 158ff3d

File tree

2 files changed

+17
-16
lines changed

2 files changed

+17
-16
lines changed

snooty.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ sharedinclude_root = "https://raw.githubusercontent.com/10gen/docs-shared/main/"
2525
driver-short = "PyMongo"
2626
driver-long = "PyMongo, the MongoDB synchronous Python driver,"
2727
driver-async = "PyMongo Async"
28-
django-odm = "MongoDB Backend for Django"
28+
django-odm = "Django MongoDB Backend"
2929
language = "Python"
3030
mdb-server = "MongoDB Server"
3131
mongo-community = "MongoDB Community Edition"

source/interact-data/crud.txt

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -59,28 +59,29 @@ The ``Movie`` model class has the following definition:
5959
from django_mongodb_backend.fields import EmbeddedModelField, ArrayField
6060
from django_mongodb_backend.managers import MongoManager
6161

62-
class Movie(models.Model):
63-
title = models.CharField(max_length=200)
64-
plot = models.TextField(null=True)
65-
runtime = models.IntegerField(default=0)
66-
released = models.DateTimeField("release date", null=True)
67-
awards = EmbeddedModelField(Award)
68-
genres = ArrayField(models.CharField(max_length=100), blank=True)
69-
objects = MongoManager()
70-
71-
class Meta:
72-
db_table = "movies"
73-
74-
def __str__(self):
75-
return self.title
62+
class Movie(models.Model):
63+
title = models.CharField(max_length=200)
64+
plot = models.TextField(blank=True)
65+
runtime = models.IntegerField(default=0)
66+
released = models.DateTimeField("release date", null=True, blank=True)
67+
awards = EmbeddedModelField(Award)
68+
genres = ArrayField(models.CharField(max_length=100), null=True, blank=True)
69+
objects = MongoManager()
70+
71+
class Meta:
72+
db_table = "movies"
73+
managed = False
74+
75+
def __str__(self):
76+
return self.title
7677

7778
You can use the Python interactive shell to run the code examples.
7879
To enter the shell, run the following command from your project's
7980
root directory:
8081

8182
.. code-block:: bash
8283

83-
python3 manage.py shell
84+
python manage.py shell
8485

8586
To learn how to create a Django application that uses the ``Movie``
8687
model and the Python interactive shell to interact with MongoDB documents,

0 commit comments

Comments
 (0)