def handle_solution_form(form, attributes): solution = form.save(commit=False) fill_object(solution, attributes) # TODO modify to .path & test xml = SolutionSpecification.make_xml(solution) config = solution.get_config_filepath() with open(config, "w") as xmlConfigFile: xmlConfigFile.write(xml.toprettyxml()) return HttpResponseRedirect(reverse(index))