mirror of
https://github.com/django/django.git
synced 2024-12-01 15:42:04 +01: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
@ -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 New Issue
Block a user