summaryrefslogtreecommitdiff
path: root/tests/regressiontests/admin_views/models.py
diff options
context:
space:
mode:
authorJulien Phalip <jphalip@gmail.com>2011-10-26 05:33:17 +0000
committerJulien Phalip <jphalip@gmail.com>2011-10-26 05:33:17 +0000
commit2e2689c7c0436f21d25e40f90f9d386311c776f9 (patch)
tree717b7fca71d55aab9cd57a88ae8c048aa06ca5c7 /tests/regressiontests/admin_views/models.py
parentc1a014bba4f25e7d9c6c1a46737bcd5d490a13f7 (diff)
Fixed #15938 -- Prevented the `max_length` number in the admin `prepopulated_fields` javascript to be localized when `USE_THOUSAND_SEPARATOR` is turned on. Thanks to Lev Maximov, Mathieu Agopian and feel.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17033 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/regressiontests/admin_views/models.py')
-rw-r--r--tests/regressiontests/admin_views/models.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/regressiontests/admin_views/models.py b/tests/regressiontests/admin_views/models.py
index 8224383209..fce02189f5 100644
--- a/tests/regressiontests/admin_views/models.py
+++ b/tests/regressiontests/admin_views/models.py
@@ -538,3 +538,13 @@ class ComplexSortedPerson(models.Model):
age = models.PositiveIntegerField()
is_employee = models.NullBooleanField()
+class PrePopulatedPostLargeSlug(models.Model):
+ """
+ Regression test for #15938: a large max_length for the slugfield must not
+ be localized in prepopulated_fields_js.html or it might end up breaking
+ the javascript (ie, using THOUSAND_SEPARATOR ends up with maxLength=1,000)
+ """
+ title = models.CharField(max_length=100)
+ published = models.BooleanField()
+ slug = models.SlugField(max_length=1000)
+ \ No newline at end of file