Changeset 5871
- Timestamp:
- 08/12/07 05:37:56 (1 year ago)
- Files:
-
- django/trunk/docs/tutorial01.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/docs/tutorial01.txt
r5825 r5871 445 445 446 446 # Create a new Poll. 447 >>> from datetimeimport datetime448 >>> 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. … … 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
