Index: django/newforms/widgets.py
===================================================================
--- django/newforms/widgets.py (Revision 4300)
+++ django/newforms/widgets.py (Arbeitskopie)
@@ -144,6 +144,23 @@
output.append(u'')
return u'\n'.join(output)
+class SelectGrouped(Select):
+ def render(self, name, value, attrs=None, choices=()):
+ if value is None: value = ''
+ final_attrs = self.build_attrs(attrs, name=name)
+ output = [u'')
+ return u'\n'.join(output)
+
class SelectMultiple(Widget):
def __init__(self, attrs=None, choices=()):
# choices can be any iterable
@@ -167,6 +184,23 @@
return data.getlist(name)
return data.get(name, None)
+class SelectMultipleGrouped(SelectMultiple):
+ def render(self, name, value, attrs=None, choices=()):
+ if value is None: value = []
+ final_attrs = self.build_attrs(attrs, name=name)
+ output = [u'')
+ return u'\n'.join(output)
+
class RadioInput(StrAndUnicode):
"An object used by RadioFieldRenderer that represents a single ."
def __init__(self, name, value, attrs, choice, index):