Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Helper class to handle form composition

branch: master
README.rst

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.']}
Something went wrong with that request. Please try again.