1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

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
This commit is contained in:
Julien Phalip
2011-10-26 05:33:17 +00:00
parent c1a014bba4
commit 2e2689c7c0
4 changed files with 29 additions and 2 deletions

View File

@@ -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)