Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
  • Loading branch information...
commit 84bc65e13757d8cae2d4f92133d09c10fa4a249c 1 parent 534671a
Malcolm Tredinnick authored August 12, 2007

Showing 1 changed file with 3 additions and 3 deletions. Show diff stats Hide diff stats

  1. 6  docs/tutorial01.txt
6  docs/tutorial01.txt
@@ -444,8 +444,8 @@ Once you're in the shell, explore the database API::
444 444
     []
445 445
 
446 446
     # Create a new Poll.
447  
-    >>> from datetime import datetime
448  
-    >>> p = Poll(question="What's up?", pub_date=datetime.now())
  447
+    >>> import datetime
  448
+    >>> p = Poll(question="What's up?", pub_date=datetime.datetime.now())
449 449
 
450 450
     # Save the object into the database. You have to call save() explicitly.
451 451
     >>> p.save()
@@ -464,7 +464,7 @@ Once you're in the shell, explore the database API::
464 464
     datetime.datetime(2007, 7, 15, 12, 00, 53)
465 465
 
466 466
     # Change values by changing the attributes, then calling save().
467  
-    >>> p.pub_date = datetime(2007, 4, 1, 0, 0)
  467
+    >>> p.pub_date = datetime.datetime(2007, 4, 1, 0, 0)
468 468
     >>> p.save()
469 469
 
470 470
     # objects.all() displays all the polls in the database.

0 notes on commit 84bc65e

Please sign in to comment.
Something went wrong with that request. Please try again.