Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Tweaked the validation test models to avoid tripping over the fact th…

…at Oracle doesn't like columns named 'number'.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@12358 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 33b1036f6f6b1a1bf50254db093a13f7b19a4873 1 parent 0741fb6
@kmtracey kmtracey authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 tests/modeltests/validation/models.py
View
4 tests/modeltests/validation/models.py
@@ -11,7 +11,7 @@ def validate_answer_to_universe(value):
class ModelToValidate(models.Model):
name = models.CharField(max_length=100)
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})
email = models.EmailField(blank=True)
url = models.URLField(blank=True)
@@ -47,7 +47,7 @@ class UniqueForDateModel(models.Model):
class CustomMessagesModel(models.Model):
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'},
validators=[validate_answer_to_universe]
)
Please sign in to comment.
Something went wrong with that request. Please try again.