diff --git a/django/contrib/admin/views/main.py b/django/contrib/admin/views/main.py index c0e59f9a5fb..42a2f485ca1 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 b75216fbc6c..00ae10b56b7 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 8e2ac13c2fc..b9e2a5da024 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 = 'name(None)' % link + row_html = 'name-' % link self.assertNotEqual(table_output.find(row_html), -1, 'Failed to find expected row element: %s' % table_output)