Merge master into task/3730/refactor_price_parameter
This commit is contained in:
commit
c17604e5c1
11 changed files with 199 additions and 64 deletions
|
|
@ -33,13 +33,16 @@ 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.hosting_utils import get_vm_price
|
||||
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
|
||||
|
|
@ -47,6 +50,7 @@ from .mixins import ProcessVMSelectionMixin
|
|||
from .models import HostingOrder, HostingBill, HostingPlan, UserHostingKey
|
||||
from datacenterlight.models import VMTemplate
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
CONNECTION_ERROR = "Your VMs cannot be displayed at the moment due to a \
|
||||
|
|
@ -282,6 +286,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'
|
||||
|
|
@ -319,7 +331,7 @@ class PasswordResetConfirmView(PasswordResetConfirmViewMixin):
|
|||
messages.success(request, _('Password has been reset.'))
|
||||
|
||||
# Change opennebula password
|
||||
opennebula_client.change_user_password(new_password)
|
||||
opennebula_client.change_user_password(user.password)
|
||||
|
||||
return self.form_valid(form)
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue