summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2015-03-12 09:40:03 -0400
committerTim Graham <timograham@gmail.com>2015-03-12 09:40:56 -0400
commite4a578e70e2e48ab792e38c67579808a1def6024 (patch)
treef6f962942be7248781a5c7a337b11358c14d35da
parentb4d8b16e5109170614ba505e36f60c2ad64dafc2 (diff)
Fixed #24226 -- Changed admin EMPTY_CHANGELIST_VALUE from (None) to -
-rw-r--r--django/contrib/admin/views/main.py4
-rw-r--r--docs/releases/1.9.txt3
-rw-r--r--tests/admin_changelist/tests.py2
3 files changed, 6 insertions, 3 deletions
diff --git a/django/contrib/admin/views/main.py b/django/contrib/admin/views/main.py
index c0e59f9a5f..42a2f485ca 100644
--- a/django/contrib/admin/views/main.py
+++ b/django/contrib/admin/views/main.py
@@ -20,7 +20,7 @@ from django.db import models
from django.utils import six
from django.utils.encoding import force_text
from django.utils.http import urlencode
-from django.utils.translation import ugettext, ugettext_lazy
+from django.utils.translation import ugettext
# Changelist settings
ALL_VAR = 'all'
@@ -34,7 +34,7 @@ IGNORED_PARAMS = (
ALL_VAR, ORDER_VAR, ORDER_TYPE_VAR, SEARCH_VAR, IS_POPUP_VAR, TO_FIELD_VAR)
# Text to display within change-list table cells if the value is blank.
-EMPTY_CHANGELIST_VALUE = ugettext_lazy('(None)')
+EMPTY_CHANGELIST_VALUE = '-'
class ChangeList(object):
diff --git a/docs/releases/1.9.txt b/docs/releases/1.9.txt
index b75216fbc6..00ae10b56b 100644
--- a/docs/releases/1.9.txt
+++ b/docs/releases/1.9.txt
@@ -249,6 +249,9 @@ Miscellaneous
* CSS and images in ``contrib.admin`` to support Internet Explorer 6 & 7 have
been removed as these browsers have reached end-of-life.
+* The text displayed for null columns in the admin changelist ``list_display``
+ cells has changed from ``(None)`` (or its translated equivalent) to ``-``.
+
* ``django.http.responses.REASON_PHRASES`` and
``django.core.handlers.wsgi.STATUS_CODE_TEXT`` have been removed. Use
Python's stdlib instead: :data:`http.client.responses` for Python 3 and
diff --git a/tests/admin_changelist/tests.py b/tests/admin_changelist/tests.py
index 8e2ac13c2f..b9e2a5da02 100644
--- a/tests/admin_changelist/tests.py
+++ b/tests/admin_changelist/tests.py
@@ -95,7 +95,7 @@ class ChangeListTests(TestCase):
context = Context({'cl': cl})
table_output = template.render(context)
link = reverse('admin:admin_changelist_child_change', args=(new_child.id,))
- row_html = '<tbody><tr class="row1"><th class="field-name"><a href="%s">name</a></th><td class="field-parent nowrap">(None)</td></tr></tbody>' % link
+ row_html = '<tbody><tr class="row1"><th class="field-name"><a href="%s">name</a></th><td class="field-parent nowrap">-</td></tr></tbody>' % link
self.assertNotEqual(table_output.find(row_html), -1,
'Failed to find expected row element: %s' % table_output)