from django import forms
class TestWidget(forms.MultiWidget):
def __init__(self, attrs=None):
widgets = (
forms.TextInput(attrs=attrs),
forms.TextInput(attrs=attrs),
)
super(TestWidget, self).__init__(widgets, attrs)
def decompress(self, value):
if value:
return value.split(':')
return (None, None,)