mirror of
https://github.com/django/django.git
synced 2025-10-25 06:36:07 +00:00
Fixed #17190 -- Ensured that the NullBooleanSelect widget's options get lazily localized. Thanks to pennersr for the report and to kenth for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17091 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -552,7 +552,9 @@ class NullBooleanSelect(Select):
|
||||
A Select Widget intended to be used with NullBooleanField.
|
||||
"""
|
||||
def __init__(self, attrs=None):
|
||||
choices = ((u'1', ugettext('Unknown')), (u'2', ugettext('Yes')), (u'3', ugettext('No')))
|
||||
choices = ((u'1', ugettext_lazy('Unknown')),
|
||||
(u'2', ugettext_lazy('Yes')),
|
||||
(u'3', ugettext_lazy('No')))
|
||||
super(NullBooleanSelect, self).__init__(attrs, choices)
|
||||
|
||||
def render(self, name, value, attrs=None, choices=()):
|
||||
|
||||
Reference in New Issue
Block a user