class ClassBasedFormView(generic.View): template_name = 'form.html' def get(self, request): form = PersonDetailsForm() return render(request, self.template_name, {'form': form}) def post(self, request): form = PersonDetailsForm(request.POST) if form.is_valid(): # Success! We can use form.cleaned_data now return redirect('success') else: # Invalid form! Reshow the form with error highlighted return render(request, self.template_name, {'form': form})