From 5d6745301e02aba86dfa4f6e61ada4eb3f44fe1d Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Sun, 28 Jan 2007 22:36:34 +0000 Subject: newforms-admin: Merged to [4442] git-svn-id: http://code.djangoproject.com/svn/django/branches/newforms-admin@4443 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- tests/modeltests/model_forms/models.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tests') diff --git a/tests/modeltests/model_forms/models.py b/tests/modeltests/model_forms/models.py index 81a7ec2abf..657d506b33 100644 --- a/tests/modeltests/model_forms/models.py +++ b/tests/modeltests/model_forms/models.py @@ -32,7 +32,7 @@ class Category(models.Model): return self.name class Writer(models.Model): - name = models.CharField(maxlength=50) + name = models.CharField(maxlength=50, help_text='Use both first and last names.') def __str__(self): return self.name @@ -150,7 +150,7 @@ represented by a ChoiceField. - +
Hold down "Control", or "Command" on a Mac, to select more than one. You can pass a custom Form class to form_for_model. Make sure it's a subclass of BaseForm, not Form. @@ -169,7 +169,7 @@ current values are inserted as 'initial' data in each Field. >>> RoykoForm = form_for_instance(w) >>> f = RoykoForm(auto_id=False) >>> print f -Name: +Name:
Use both first and last names. >>> art = Article(headline='Test article', pub_date=datetime.date(1988, 1, 4), writer=w, article='Hello.') >>> art.save() @@ -190,7 +190,7 @@ current values are inserted as 'initial' data in each Field. - + Hold down "Control", or "Command" on a Mac, to select more than one. >>> f = TestArticleForm({'headline': u'New headline', 'pub_date': u'1988-01-04', 'writer': u'1', 'article': 'Hello.'}) >>> f.is_valid() True @@ -222,7 +222,7 @@ Add some categories and test the many-to-many form output. - + Hold down "Control", or "Command" on a Mac, to select more than one. >>> f = TestArticleForm({'headline': u'New headline', 'pub_date': u'1988-01-04', ... 'writer': u'1', 'article': u'Hello.', 'categories': [u'1', u'2']}) -- cgit v1.3