mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
[soc2009/model-validation] Added simple tests for ForeignKey validation.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@10879 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -8,6 +8,7 @@ class ModelToValidate(models.Model):
|
||||
name = models.CharField(max_length=100)
|
||||
created = models.DateTimeField(default=datetime.now)
|
||||
number = models.IntegerField()
|
||||
parent = models.ForeignKey('self', blank=True, null=True)
|
||||
|
||||
def validate(self):
|
||||
super(ModelToValidate, self).validate()
|
||||
|
||||
Reference in New Issue
Block a user