From f6bdaa01d5299da2548e72dbae83010c7d839bcd Mon Sep 17 00:00:00 2001 From: Benni Baermann Date: Thu, 14 Jan 2021 09:37:45 +0100 Subject: [PATCH] added redirect after last step --- evapp/views.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/evapp/views.py b/evapp/views.py index 598a54d..48bab61 100644 --- a/evapp/views.py +++ b/evapp/views.py @@ -2,7 +2,7 @@ from smtplib import SMTPException from django.views.generic.edit import CreateView from django.urls import reverse -from django.http import HttpResponse +from django.http import HttpResponse, HttpResponseRedirect from django.core.mail import send_mail, BadHeaderError from django.template.loader import get_template from formtools.wizard.views import CookieWizardView @@ -70,8 +70,6 @@ class EvaFormView(CookieWizardView): print(form_data) for dep in MAILS: send_mail_to_department(dep, form_data) - return render(self.request, 'evapp/dataloop.txt', { - 'data': form_data, - }) + return HttpResponseRedirect('success') - return super().form_valid(form) + # return super().form_valid(form)