mirror of
https://github.com/django/django.git
synced 2025-09-26 12:09:19 +00:00
Fixed #9706: made SlugField honor max_length in Oracle, matching the other backends.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9548 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
485316017a
commit
4637a77ff8
2 changed files with 10 additions and 1 deletions
|
@ -36,6 +36,9 @@ class Whiz(models.Model):
|
|||
class BigD(models.Model):
|
||||
d = models.DecimalField(max_digits=38, decimal_places=30)
|
||||
|
||||
class BigS(models.Model):
|
||||
s = models.SlugField(max_length=255)
|
||||
|
||||
__test__ = {'API_TESTS':"""
|
||||
# Create a couple of Places.
|
||||
>>> f = Foo.objects.create(a='abc', d=decimal.Decimal("12.34"))
|
||||
|
@ -88,4 +91,10 @@ u''
|
|||
>>> bd = BigD.objects.get(pk=bd.pk)
|
||||
>>> bd.d == decimal.Decimal("12.9")
|
||||
True
|
||||
|
||||
# Regression test for #9706: ensure SlugField honors max_length.
|
||||
>>> bs = BigS.objects.create(s = 'slug' * 50)
|
||||
>>> bs = BigS.objects.get(pk=bs.pk)
|
||||
>>> bs.s == 'slug' * 50
|
||||
True
|
||||
"""}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue