1

In django/contrib/admin/views/main.py, you can find:

# Text to display within change-list table cells if the value is blank.
EMPTY_CHANGELIST_VALUE = ugettext_lazy('(None)')

How can I cange this value without the use of translations and without overriding the whole django-admin app?

4

1 回答 1

3

看起来你需要猴子补丁EMPTY_CHANGELIST_VALUE。试着把它放在上面settings.py

from django.contrib.admin.views import main
main.EMPTY_CHANGELIST_VALUE = <your_value>

它看起来不太好,但我希望它对你有用。

于 2013-08-19T22:39:52.013 回答