summaryrefslogtreecommitdiff
path: root/tests/regressiontests/modeladmin
diff options
context:
space:
mode:
authorJannis Leidel <jannis@leidel.info>2011-05-24 09:17:55 +0000
committerJannis Leidel <jannis@leidel.info>2011-05-24 09:17:55 +0000
commit4a4b6b271e681ce1c68bc0f10eb90355896e1a91 (patch)
tree5ff16327ef433284e44620c0207d67cf75915bc7 /tests/regressiontests/modeladmin
parentc0303f5d8160d4a31bc46947e0a901d4eea2d201 (diff)
Fixed #16080 -- Handle admin list filter items with two characters better. Thanks, Ales Zoulek and Julien Phalip.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16274 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests/regressiontests/modeladmin')
-rw-r--r--tests/regressiontests/modeladmin/models.py1
-rw-r--r--tests/regressiontests/modeladmin/tests.py2
2 files changed, 2 insertions, 1 deletions
diff --git a/tests/regressiontests/modeladmin/models.py b/tests/regressiontests/modeladmin/models.py
index 2eda54e7fb..26eaaae07d 100644
--- a/tests/regressiontests/modeladmin/models.py
+++ b/tests/regressiontests/modeladmin/models.py
@@ -34,6 +34,7 @@ class ValidationTestModel(models.Model):
is_active = models.BooleanField()
pub_date = models.DateTimeField()
band = models.ForeignKey(Band)
+ no = models.IntegerField(verbose_name="Number", blank=True, null=True) # This field is intentionally 2 characters long. See #16080.
def decade_published_in(self):
return self.pub_date.strftime('%Y')[:3] + "0's"
diff --git a/tests/regressiontests/modeladmin/tests.py b/tests/regressiontests/modeladmin/tests.py
index 530b476b7c..7387a95258 100644
--- a/tests/regressiontests/modeladmin/tests.py
+++ b/tests/regressiontests/modeladmin/tests.py
@@ -911,7 +911,7 @@ class ValidationTests(unittest.TestCase):
# Valid declarations below -----------
class ValidationTestModelAdmin(ModelAdmin):
- list_filter = ('is_active', AwesomeFilter, ('is_active', BooleanFieldListFilter))
+ list_filter = ('is_active', AwesomeFilter, ('is_active', BooleanFieldListFilter), 'no')
validate(ValidationTestModelAdmin, ValidationTestModel)