Django

Code

Changeset 5871

Show
Ignore:
Timestamp:
08/12/07 05:37:56 (1 year ago)
Author:
mtredinnick
Message:

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.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/docs/tutorial01.txt

    r5825 r5871  
    445445 
    446446    # 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()) 
    449449 
    450450    # Save the object into the database. You have to call save() explicitly. 
     
    465465 
    466466    # 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) 
    468468    >>> p.save() 
    469469