summaryrefslogtreecommitdiff
path: root/tests/regressiontests/admin_views/models.py
diff options
context:
space:
mode:
authorEdward Tjörnhammar <e@cube2.se>2012-11-25 23:13:22 +0100
committerJulien Phalip <jphalip@gmail.com>2012-11-25 23:13:30 +0100
commit29d59a879ea5b116cc31a2fd91be1f7562e487c2 (patch)
treef0c382eb697758ede86320fff04391d000953a20 /tests/regressiontests/admin_views/models.py
parent05dbc07c52ec222f57d358f13f9192ab2b20d098 (diff)
Fixed #17911 -- Ensure that admin readonly fields' display values are shown in change forms when the raw value is None.
Diffstat (limited to 'tests/regressiontests/admin_views/models.py')
-rw-r--r--tests/regressiontests/admin_views/models.py4
1 files changed, 4 insertions, 0 deletions
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')))