Author: ikelly Date: 2008-12-02 12:40:40 -0600 (Tue, 02 Dec 2008) New Revision: 9548
Modified: django/trunk/django/db/backends/oracle/creation.py django/trunk/tests/regressiontests/model_fields/models.py Log: Fixed #9706: made SlugField honor max_length in Oracle, matching the other backends. Modified: django/trunk/django/db/backends/oracle/creation.py =================================================================== --- django/trunk/django/db/backends/oracle/creation.py 2008-12-02 16:59:39 UTC (rev 9547) +++ django/trunk/django/db/backends/oracle/creation.py 2008-12-02 18:40:40 UTC (rev 9548) @@ -32,7 +32,7 @@ 'OneToOneField': 'NUMBER(11)', 'PositiveIntegerField': 'NUMBER(11) CHECK (%(qn_column)s >= 0)', 'PositiveSmallIntegerField': 'NUMBER(11) CHECK (%(qn_column)s >= 0)', - 'SlugField': 'NVARCHAR2(50)', + 'SlugField': 'NVARCHAR2(%(max_length)s)', 'SmallIntegerField': 'NUMBER(11)', 'TextField': 'NCLOB', 'TimeField': 'TIMESTAMP', Modified: django/trunk/tests/regressiontests/model_fields/models.py =================================================================== --- django/trunk/tests/regressiontests/model_fields/models.py 2008-12-02 16:59:39 UTC (rev 9547) +++ django/trunk/tests/regressiontests/model_fields/models.py 2008-12-02 18:40:40 UTC (rev 9548) @@ -36,6 +36,9 @@ 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 @@ >>> 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 """} --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-updates?hl=en -~----------~----~----~----~------~----~------~--~---