def form_view_with_template(request):
if request.method == '<STR_LIT:POST>':<EOL><INDENT>form = TestForm(request.POST)<EOL>if form.is_valid():<EOL><INDENT>message = '<STR_LIT>'<EOL><DEDENT>else:<EOL><INDENT>message = '<STR_LIT>'<EOL><DEDENT><DEDENT>else:<EOL><INDENT>form = TestForm()<EOL>message = '<STR_LIT>'<EOL><DEDENT>return render(request, '<STR_LIT>', {<EOL>'<STR_LIT>': form,<EOL>'<STR_LIT:message>': message,<EOL>})<EOL>
A view that tests a simple form