Fixes #1765: Improved rendering of null options for model choice fields in filter forms

This commit is contained in:
Jeremy Stretch
2017-12-26 12:08:22 -05:00
parent b4a842d9da
commit 78ed85943b
7 changed files with 53 additions and 45 deletions

View File

@@ -42,7 +42,7 @@ class NullableModelMultipleChoiceField(forms.ModelMultipleChoiceField):
"""
iterator = forms.models.ModelChoiceIterator
def __init__(self, null_value=0, null_label='None', *args, **kwargs):
def __init__(self, null_value=0, null_label='-- None --', *args, **kwargs):
self.null_value = null_value
self.null_label = null_label
super(NullableModelMultipleChoiceField, self).__init__(*args, **kwargs)