From 7c91b67cfaf4669df55a715e62d891faea796f20 Mon Sep 17 00:00:00 2001 From: Edward Tjörnhammar Date: Sun, 25 Nov 2012 23:13:22 +0100 Subject: [1.5.x] Fixed #17911 -- Ensure that admin readonly fields' display values are shown in change forms when the raw value is None. Backport of 29d59a879ea5b116 --- tests/regressiontests/admin_views/models.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests/regressiontests/admin_views/models.py') diff --git a/tests/regressiontests/admin_views/models.py b/tests/regressiontests/admin_views/models.py index 6f2ddc23a2..003b6ce8b2 100644 --- a/tests/regressiontests/admin_views/models.py +++ b/tests/regressiontests/admin_views/models.py @@ -660,3 +660,7 @@ class Simple(models.Model): """ Simple model with nothing on it for use in testing """ + +class Choice(models.Model): + choice = models.CharField(max_length=1, blank=True, null=True, + choices=(('y','Yes'), ('n','No'), (None, 'No opinion'))) -- cgit v1.3