summaryrefslogtreecommitdiff
path: root/docs/overview.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/overview.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/overview.txt')
-rw-r--r--docs/overview.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/overview.txt b/docs/overview.txt
index 7fba5e1767..19d48ba059 100644
--- a/docs/overview.txt
+++ b/docs/overview.txt
@@ -64,7 +64,7 @@ is created on the fly: No code generation necessary::
[]
# Create a new Reporter.
- >>> r = reporters.Reporter(id=None, full_name='John Smith')
+ >>> r = reporters.Reporter(full_name='John Smith')
# Save the object into the database. You have to call save() explicitly.
>>> r.save()
@@ -101,7 +101,7 @@ is created on the fly: No code generation necessary::
# Create an article.
>>> from datetime import datetime
- >>> a = articles.Article(id=None, pub_date=datetime.now(), headline='Django is cool', article='Yeah.', reporter_id=1)
+ >>> a = articles.Article(pub_date=datetime.now(), headline='Django is cool', article='Yeah.', reporter_id=1)
>>> a.save()
# Now the article is in the database.