From afc368e9dd6cf470a3aaa547a5f6a63e2768e816 Mon Sep 17 00:00:00 2001 From: PCoder Date: Sun, 24 Sep 2017 15:49:40 +0530 Subject: [PATCH] Added ResendActivationEmailView --- hosting/views.py | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/hosting/views.py b/hosting/views.py index d7c4c168..02e68bbd 100644 --- a/hosting/views.py +++ b/hosting/views.py @@ -33,12 +33,15 @@ from membership.models import CustomUser, StripeCustomer from opennebula_api.models import OpenNebulaManager from opennebula_api.serializers import VirtualMachineSerializer, \ VirtualMachineTemplateSerializer, VMTemplateSerializer -from utils.forms import BillingAddressForm, PasswordResetRequestForm, \ - UserBillingAddressForm +from utils.forms import ( + BillingAddressForm, PasswordResetRequestForm, UserBillingAddressForm, + ResendActivationEmailForm +) from utils.mailer import BaseEmail from utils.stripe_utils import StripeUtils from utils.views import ( - PasswordResetViewMixin, PasswordResetConfirmViewMixin, LoginViewMixin + PasswordResetViewMixin, PasswordResetConfirmViewMixin, LoginViewMixin, + ResendActivationLinkViewMixin ) from .forms import HostingUserSignupForm, HostingUserLoginForm, \ UserHostingKeyForm, generate_ssh_key_name @@ -282,6 +285,14 @@ class SignupValidatedView(SignupValidateView): return context +class ResendActivationEmailView(ResendActivationLinkViewMixin): + template_name = 'hosting/resend_activation_link.html' + form_class = ResendActivationEmailForm + success_url = reverse_lazy('hosting:login') + email_template_path = 'datacenterlight/emails/' + email_template_name = 'user_activation' + + class PasswordResetView(PasswordResetViewMixin): site = 'dcl' template_name = 'hosting/reset_password.html'