-
-
{% trans "Your VM hosted in Switzerland"%}
-
-
-
-
{% trans "Sign up"%}
-
-
+
{% endblock %}
diff --git a/hosting/views.py b/hosting/views.py
index 520894ae..279e0930 100644
--- a/hosting/views.py
+++ b/hosting/views.py
@@ -193,8 +193,10 @@ class SignupView(CreateView):
name = form.cleaned_data.get('name')
email = form.cleaned_data.get('email')
password = form.cleaned_data.get('password')
- this_base_url = "{0}://{1}".format(self.request.scheme, self.request.get_host())
- CustomUser.register(name, password, email, app='dcl', base_url=this_base_url)
+ this_base_url = "{0}://{1}".format(self.request.scheme,
+ self.request.get_host())
+ CustomUser.register(name, password, email,
+ app='dcl', base_url=this_base_url)
return HttpResponseRedirect(reverse_lazy('hosting:signup-validate'))
@@ -204,8 +206,10 @@ class SignupValidateView(TemplateView):
def get_context_data(self, **kwargs):
context = super(SignupValidateView, self).get_context_data(**kwargs)
- login_url = '
' + str(_('login')) + ''
- home_url = '
Data Center Light'
+ login_url = '
' + str(_('login')) + ''
+ home_url = '
Data Center Light'
message = '{signup_success_message} {lurl} \
{go_back} {hurl}.'.format(
signup_success_message=_(
@@ -226,15 +230,18 @@ class SignupValidatedView(SignupValidateView):
def get_context_data(self, **kwargs):
context = super(SignupValidateView, self).get_context_data(**kwargs)
validated = CustomUser.validate_url(self.kwargs['validate_slug'])
- login_url = '
' + str(_('login')) + ''
+ login_url = '
' + str(_('login')) + ''
section_title = _('Account activation')
if validated:
message = '{account_activation_string}
{login_string} {lurl}.'.format(
- account_activation_string=_("Your account has been activated."),
+ account_activation_string=_(
+ "Your account has been activated."),
login_string=_("You can now"),
lurl=login_url)
else:
- home_url = '
Data Center Light'
+ home_url = '
Data Center Light'
message = '{sorry_message}
{go_back_to} {hurl}'.format(
sorry_message=_("Sorry. Your request is invalid."),
go_back_to=_('Go back to'),
@@ -410,7 +417,8 @@ class SSHKeyCreateView(LoginRequiredMixin, FormView):
public_key = form.cleaned_data.get('public_key', '').decode('utf-8')
# Add ssh key to user
try:
- manager.add_public_key(user=owner, public_key=public_key, merge=True)
+ manager.add_public_key(
+ user=owner, public_key=public_key, merge=True)
except ConnectionError:
pass
except WrongNameError:
@@ -563,7 +571,7 @@ class PaymentVMView(LoginRequiredMixin, FormView):
# Create a Hosting Bill
HostingBill.create(
- customer=customer, billing_address=billing_address)
+ customer=customer, billing_address=billing_address)
# Create Billing Address for User if he does not have one
if not customer.user.billing_addresses.count():