Hello,
I'm trying to use a multiwidget, my looks like this:
class DimensionsWidget(forms.MultiWidget):
def __init__(self, attrs=None):
widgets = (forms.widgets.TextInput(attrs=attrs),
forms.widgets.TextInput(attrs=attrs))
super(DimensionsWidget, self).__init__(widgets, attrs)
def decompress(self, value):
if value:
return value.split(",")
return [None, None]
def format_output(self, rendered_widgets):
rendered_widgets.insert(-1, "<span>Width: </span>")
rendered_widgets.insert(2, "<span>Height: </span>")
return u''.join(rendered_widgets)
Everything is working, except format_output is not being called. My
understanding is that the render method on the MultiWidget should call
format_output on the subclass, but its not being called. What am I
doing wrong?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---