From cbb7da328555b13920b9b4354ffd5257b8e996d5 Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Sun, 26 Nov 2023 12:14:43 +0530 Subject: [PATCH] Use hosting resources instead of datacenterlight --- hosting/models.py | 2 +- hosting/templates/hosting/includes/_navbar_user.html | 2 +- hosting/views.py | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/hosting/models.py b/hosting/models.py index c7d8d78..a7efa82 100644 --- a/hosting/models.py +++ b/hosting/models.py @@ -151,7 +151,7 @@ class CustomUser(AbstractBaseUser, PermissionsMixin): 'dcl_text': dcl_text }, 'template_name': 'user_activation', - 'template_path': 'datacenterlight/emails/' + 'template_path': 'hosting/emails/' } if account_details: email_data['context'][ diff --git a/hosting/templates/hosting/includes/_navbar_user.html b/hosting/templates/hosting/includes/_navbar_user.html index eded6ff..43948e5 100755 --- a/hosting/templates/hosting/includes/_navbar_user.html +++ b/hosting/templates/hosting/includes/_navbar_user.html @@ -13,7 +13,7 @@ {% endif %} - + {% if request.user.is_authenticated %} diff --git a/hosting/views.py b/hosting/views.py index 7fe5fe8..4c8a25a 100644 --- a/hosting/views.py +++ b/hosting/views.py @@ -69,7 +69,7 @@ class SignupValidateView(TemplateView): login_url = '' + str(_('login')) + '' home_url = 'Data Center Light' + reverse('hosting:login') + '">Data Center Light' message = '{signup_success_message} {lurl} \
{go_back} {hurl}.'.format( signup_success_message=_( @@ -120,7 +120,7 @@ class SignupValidatedView(SignupValidateView): email.send() else: home_url = 'Data Center Light' message = '{sorry_message}
{go_back_to} {hurl}'.format( sorry_message=_("Sorry. Your request is invalid."), @@ -274,14 +274,14 @@ class SSHKeyCreateView(FormView): class AskSSHKeyView(SSHKeyCreateView): form_class = UserHostingKeyForm - template_name = "datacenterlight/add_ssh_key.html" - success_url = reverse_lazy('datacenterlight:order_confirmation') + template_name = "hosting/add_ssh_key.html" + success_url = reverse_lazy('hosting:order_confirmation') context_object_name = "dcl_vm_buy_add_ssh_key" # @cache_control(no_cache=True, must_revalidate=True, no_store=True) def get(self, request, *args, **kwargs): context = { - 'site_url': reverse_lazy('datacenterlight:index'), + 'site_url': reverse_lazy('hosting:login'), # 'cms_integration': get_cms_integration('default'), 'form': UserHostingKeyForm(request=self.request), # 'keys': get_all_public_keys(self.request.user)