mirror of
https://github.com/Hopiu/django.git
synced 2026-05-26 23:54:06 +00:00
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:
parent
928318faf9
commit
9347f748b0
1 changed files with 2 additions and 1 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Reference in a new issue