From a3053273c8a5d450a0cd73ee8deebc277d8c4170 Mon Sep 17 00:00:00 2001 From: Boulder Sprinters Date: Mon, 2 Apr 2007 15:36:31 +0000 Subject: boulder-oracle-sprint: Merged to [4905]. git-svn-id: http://code.djangoproject.com/svn/django/branches/boulder-oracle-sprint@4906 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- tests/modeltests/invalid_models/models.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'tests/modeltests/invalid_models') diff --git a/tests/modeltests/invalid_models/models.py b/tests/modeltests/invalid_models/models.py index 2299cd85e6..af54ec3d35 100644 --- a/tests/modeltests/invalid_models/models.py +++ b/tests/modeltests/invalid_models/models.py @@ -97,6 +97,16 @@ class SelfClashM2M(models.Model): m2m_3 = models.ManyToManyField('self', symmetrical=False) m2m_4 = models.ManyToManyField('self', symmetrical=False) +class Model(models.Model): + "But it's valid to call a model Model." + year = models.PositiveIntegerField() #1960 + make = models.CharField(maxlength=10) #Aston Martin + name = models.CharField(maxlength=10) #DB 4 GT + +class Car(models.Model): + colour = models.CharField(maxlength=5) + model = models.ForeignKey(Model) + model_errors = """invalid_models.fielderrors: "charfield": CharFields require a "maxlength" attribute. invalid_models.fielderrors: "floatfield": FloatFields require a "decimal_places" attribute. invalid_models.fielderrors: "floatfield": FloatFields require a "max_digits" attribute. -- cgit v1.3