Author: mtredinnick
Date: 2007-08-12 05:37:56 -0500 (Sun, 12 Aug 2007)
New Revision: 5871

Modified:
   django/trunk/docs/tutorial01.txt
Log:
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.


Modified: django/trunk/docs/tutorial01.txt
===================================================================
--- django/trunk/docs/tutorial01.txt    2007-08-12 10:29:59 UTC (rev 5870)
+++ django/trunk/docs/tutorial01.txt    2007-08-12 10:37:56 UTC (rev 5871)
@@ -444,8 +444,8 @@
     []
 
     # 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 @@
     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.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to