Skip to content

Commit

Permalink
Fixed #4941 -- Changed imports for interactive portion of the example…
Browse files Browse the repository at this point in the history
… 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
malcolmt committed Aug 12, 2007
1 parent 534671a commit 84bc65e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/tutorial01.txt
Expand Up @@ -444,8 +444,8 @@ Once you're in the shell, explore the database API::
[] []


# Create a new Poll. # Create a new Poll.
>>> from datetime import datetime >>> import datetime
>>> p = Poll(question="What's up?", pub_date=datetime.now()) >>> p = Poll(question="What's up?", pub_date=datetime.datetime.now())


# Save the object into the database. You have to call save() explicitly. # Save the object into the database. You have to call save() explicitly.
>>> p.save() >>> p.save()
Expand All @@ -464,7 +464,7 @@ Once you're in the shell, explore the database API::
datetime.datetime(2007, 7, 15, 12, 00, 53) datetime.datetime(2007, 7, 15, 12, 00, 53)


# Change values by changing the attributes, then calling save(). # 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() >>> p.save()


# objects.all() displays all the polls in the database. # objects.all() displays all the polls in the database.
Expand Down

0 comments on commit 84bc65e

Please sign in to comment.