1
0
mirror of https://github.com/django/django.git synced 2025-11-07 07:15:35 +00:00

Fixed #29041 -- Changed SelectMultiple's multiple attribute to HTML5 boolean syntax.

This commit is contained in:
Jon Dufresne
2018-01-20 08:19:06 -08:00
committed by Tim Graham
parent b98dc1706e
commit 47d238b696
10 changed files with 42 additions and 38 deletions

View File

@@ -670,7 +670,7 @@ class Select(ChoiceWidget):
def get_context(self, name, value, attrs):
context = super().get_context(name, value, attrs)
if self.allow_multiple_selected:
context['widget']['attrs']['multiple'] = 'multiple'
context['widget']['attrs']['multiple'] = True
return context
@staticmethod