mirror of https://github.com/django/django.git
Tweaked the validation test models to avoid tripping over the fact that Oracle doesn't like columns named 'number'.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12358 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
0741fb6507
commit
33b1036f6f
|
@ -11,7 +11,7 @@ def validate_answer_to_universe(value):
|
||||||
class ModelToValidate(models.Model):
|
class ModelToValidate(models.Model):
|
||||||
name = models.CharField(max_length=100)
|
name = models.CharField(max_length=100)
|
||||||
created = models.DateTimeField(default=datetime.now)
|
created = models.DateTimeField(default=datetime.now)
|
||||||
number = models.IntegerField()
|
number = models.IntegerField(db_column='number_val')
|
||||||
parent = models.ForeignKey('self', blank=True, null=True, limit_choices_to={'number': 10})
|
parent = models.ForeignKey('self', blank=True, null=True, limit_choices_to={'number': 10})
|
||||||
email = models.EmailField(blank=True)
|
email = models.EmailField(blank=True)
|
||||||
url = models.URLField(blank=True)
|
url = models.URLField(blank=True)
|
||||||
|
@ -47,7 +47,7 @@ class UniqueForDateModel(models.Model):
|
||||||
|
|
||||||
class CustomMessagesModel(models.Model):
|
class CustomMessagesModel(models.Model):
|
||||||
other = models.IntegerField(blank=True, null=True)
|
other = models.IntegerField(blank=True, null=True)
|
||||||
number = models.IntegerField(
|
number = models.IntegerField(db_column='number_val',
|
||||||
error_messages={'null': 'NULL', 'not42': 'AAARGH', 'not_equal': '%s != me'},
|
error_messages={'null': 'NULL', 'not42': 'AAARGH', 'not_equal': '%s != me'},
|
||||||
validators=[validate_answer_to_universe]
|
validators=[validate_answer_to_universe]
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue