def add_composite_form(request, form=None): if form is None: form = make_add_form(request, composite=True) api = TemplateAPI(request, 'add') bindings = {'api': api, 'form': form} return render_to_response('templates/add.pt', bindings)
def add_composite(request): form = make_add_form(request, composite=True) try: data = form.validate(request.POST.items()) except ValidationFailure, e: return add_unique_form(request, e)