summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-08-12 10:37:56 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2007-08-12 10:37:56 +0000
commit84bc65e13757d8cae2d4f92133d09c10fa4a249c (patch)
tree387d9b545352ae31597e206feb2237c9af3f8980 /docs
parent534671a46fd0b2c0340e592f254b8772993fff19 (diff)
Fixed #4941 -- Changed imports for interactive portion of the example to be consistent with the source code file, at the expense of slightly more typing required. This might help reduce some confusion. Thanks, John Shaffer.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5871 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
-rw-r--r--docs/tutorial01.txt6
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/tutorial01.txt b/docs/tutorial01.txt
index 4f39fb4141..cf2b76e9be 100644
--- a/docs/tutorial01.txt
+++ b/docs/tutorial01.txt
@@ -444,8 +444,8 @@ Once you're in the shell, explore the database API::
[]
# Create a new Poll.
- >>> from datetime import datetime
- >>> p = Poll(question="What's up?", pub_date=datetime.now())
+ >>> import datetime
+ >>> p = Poll(question="What's up?", pub_date=datetime.datetime.now())
# Save the object into the database. You have to call save() explicitly.
>>> p.save()
@@ -464,7 +464,7 @@ Once you're in the shell, explore the database API::
datetime.datetime(2007, 7, 15, 12, 00, 53)
# Change values by changing the attributes, then calling save().
- >>> p.pub_date = datetime(2007, 4, 1, 0, 0)
+ >>> p.pub_date = datetime.datetime(2007, 4, 1, 0, 0)
>>> p.save()
# objects.all() displays all the polls in the database.