Skip to content

Latest commit

 

History

History
16 lines (9 loc) · 410 Bytes

README.rst

File metadata and controls

16 lines (9 loc) · 410 Bytes

Usage:

class ProfileAddressForm(forms.Form):
    address = forms.CharField()


class ProfileBirthDayForm(forms.Form):
    birthday = forms.DateField()


class ProfileForm(CompositeForm):
    form_list = [ProfileAddressForm, ProfileBirthDayForm]


profile_form = ProfileForm({"address": "13 Test St"})
assert profile_form.errors == {'birthday': [u'This field is required.']}