Added an EmailField to the many_to_one API tests

git-svn-id: http://code.djangoproject.com/svn/django/trunk@1315 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty 2005-11-20 22:40:46 +00:00
parent 928318faf9
commit 9347f748b0
1 changed files with 2 additions and 1 deletions

View File

@ -9,6 +9,7 @@ from django.core import meta
class Reporter(meta.Model):
first_name = meta.CharField(maxlength=30)
last_name = meta.CharField(maxlength=30)
email = meta.EmailField()
def __repr__(self):
return "%s %s" % (self.first_name, self.last_name)
@ -23,7 +24,7 @@ class Article(meta.Model):
API_TESTS = """
# Create a Reporter.
>>> r = reporters.Reporter(first_name='John', last_name='Smith')
>>> r = reporters.Reporter(first_name='John', last_name='Smith', email='john@example.com')
>>> r.save()
# Create an Article.