Skip to content

Commit 3aecefb

Browse files
Daniel Borowskidanielborowski
authored andcommitted
(DOCSP-3269) add quotes to python keys
1 parent ebc6f03 commit 3aecefb

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

source/use-cases/storing-log-data.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -204,12 +204,12 @@ using PyMongo, with an event from the Apache Log:
204204
>>> conn = pymongo.MongoClient()
205205
>>> db = conn.event_db
206206
>>> event = {
207-
... _id: bson.ObjectId(),
208-
... host: "127.0.0.1",
209-
... time: datetime(2000,10,10,20,55,36),
210-
... path: "/apache_pb.gif",
211-
... referer: "[http://www.example.com/start.html](http://www.example.com/start.html)",
212-
... user_agent: "Mozilla/4.08 [en] (Win98; I ;Nav)"
207+
... '_id': bson.ObjectId(),
208+
... 'host': "127.0.0.1",
209+
... 'time': datetime(2000,10,10,20,55,36),
210+
... 'path': "/apache_pb.gif",
211+
... 'referer': "[http://www.example.com/start.html](http://www.example.com/start.html)",
212+
... 'user_agent': "Mozilla/4.08 [en] (Win98; I ;Nav)"
213213
...}
214214

215215
The following command will insert the ``event`` object into the

0 commit comments

Comments
 (0)