From b307fb09bb615361ee296d0c1f8d1a7c4809f6dd Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Mon, 1 Aug 2005 16:26:39 +0000 Subject: 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 --- docs/tutorial01.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/tutorial01.txt') 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() -- cgit v1.3