Commit 9347f748 authored by Adrian Holovaty's avatar Adrian Holovaty
Browse files

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
parent 928318fa
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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.