summaryrefslogtreecommitdiff
path: root/docs/tutorial01.txt
diff options
context:
space:
mode:
authorAdrian Holovaty <adrian@holovaty.com>2005-08-01 16:26:39 +0000
committerAdrian Holovaty <adrian@holovaty.com>2005-08-01 16:26:39 +0000
commitb307fb09bb615361ee296d0c1f8d1a7c4809f6dd (patch)
treedcd24dd3208358dcdf774cce7367f5ee9528d49b /docs/tutorial01.txt
parent1a8fc57bf6e4b86fe047d04fea2efe50296634d0 (diff)
Fixed #239 and #107 -- Changed model init() to use Field.get_default() if the value wasn't explicitly passed as a keyword argument. That means setting 'id=None' is no longer necessary, and you can leave off fields if you want them to have default values set.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@360 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/tutorial01.txt')
-rw-r--r--docs/tutorial01.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/tutorial01.txt b/docs/tutorial01.txt
index bfdad7dfed..60f370e5a9 100644
--- a/docs/tutorial01.txt
+++ b/docs/tutorial01.txt
@@ -298,7 +298,7 @@ free Python API Django gives you::
# Create a new Poll.
>>> from datetime import datetime
- >>> p = polls.Poll(id=None, question="What's up?", pub_date=datetime.now())
+ >>> p = polls.Poll(question="What's up?", pub_date=datetime.now())
# Save the object into the database. You have to call save() explicitly.
>>> p.save()