contact(request): if request.method == 'POST': form = ContactForm(request.POST) if form.is_valid(): # Process the data in form.cleaned_data # ... return HttpResponseRedirect('/thanks/') else: form = ContactForm() ! return render(request, 'contact.html', { 'form': form, })