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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user