From 32e50112413793818a564a70fb122d15d668d3cc Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Sun, 11 Jun 2017 05:08:13 +0530 Subject: [PATCH 01/26] Added user_activation email templates --- .../emails/user_activation.html | 129 ++++++++++++++++++ .../emails/user_activation.txt | 129 ++++++++++++++++++ 2 files changed, 258 insertions(+) create mode 100644 datacenterlight/templates/datacenterlight/emails/user_activation.html create mode 100644 datacenterlight/templates/datacenterlight/emails/user_activation.txt diff --git a/datacenterlight/templates/datacenterlight/emails/user_activation.html b/datacenterlight/templates/datacenterlight/emails/user_activation.html new file mode 100644 index 00000000..2948b797 --- /dev/null +++ b/datacenterlight/templates/datacenterlight/emails/user_activation.html @@ -0,0 +1,129 @@ +{% load static from staticfiles %} + + + + + + +Oxygen Invoice + + + + + + + + + + + + + +
+
+ + +
+ +
+ + + +
+ logo + +
+
+ +
+
+
+
+ + + + + + + + + + +
+ Datacenterlight user activation +
+

+ You can activate your datacenterlight account by clicking here.

+ You can also copy and paste the following link into the address bar of your browser and follow the link in order to activate your datacenterlight account.
+ {{base_url}}{{activation_link}} +

 
+
+
+
+ + +
Your data center light team
+
+
+
+ + + diff --git a/datacenterlight/templates/datacenterlight/emails/user_activation.txt b/datacenterlight/templates/datacenterlight/emails/user_activation.txt new file mode 100644 index 00000000..2948b797 --- /dev/null +++ b/datacenterlight/templates/datacenterlight/emails/user_activation.txt @@ -0,0 +1,129 @@ +{% load static from staticfiles %} + + + + + + +Oxygen Invoice + + + + + + + + + + + + + +
+
+ + +
+ +
+ + + +
+ logo + +
+
+ +
+
+
+
+ + + + + + + + + + +
+ Datacenterlight user activation +
+

+ You can activate your datacenterlight account by clicking here.

+ You can also copy and paste the following link into the address bar of your browser and follow the link in order to activate your datacenterlight account.
+ {{base_url}}{{activation_link}} +

 
+
+
+
+ + +
Your data center light team
+
+
+
+ + + From bd10d1cf9f560ca55c8280af323027c7a3d1a455 Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Sun, 11 Jun 2017 05:10:00 +0530 Subject: [PATCH 02/26] Added signup_validate html template. This is an empty template that we use to show appropriate message during email confirmation --- .../templates/hosting/signup_validate.html | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 hosting/templates/hosting/signup_validate.html diff --git a/hosting/templates/hosting/signup_validate.html b/hosting/templates/hosting/signup_validate.html new file mode 100644 index 00000000..00b0561a --- /dev/null +++ b/hosting/templates/hosting/signup_validate.html @@ -0,0 +1,21 @@ +{% extends "hosting/base_short.html" %} +{% load staticfiles bootstrap3 i18n %} + +{% block content %} +
+
+
+
+

{% trans "Your VM hosted in Switzerland"%}

+
+
+ +
+
+
+{% endblock %} From b8463360b541a30c8094afb35b37029f16ebb579 Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Sun, 11 Jun 2017 05:11:09 +0530 Subject: [PATCH 03/26] Added styles for message title and text for email confirmation --- hosting/static/hosting/css/landing-page.css | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/hosting/static/hosting/css/landing-page.css b/hosting/static/hosting/css/landing-page.css index 5d4c6a90..c6cf9169 100644 --- a/hosting/static/hosting/css/landing-page.css +++ b/hosting/static/hosting/css/landing-page.css @@ -317,6 +317,17 @@ h6 { padding: 15px 20px 0 20px; } +.sign-up-message { + padding: 25px 30px 25px 30px; + text-align: justify; + font-size: 18px; + line-height: 30px; +} +.sign-up-message a { + font-size: 18px; + color: #1e94cc !important; +} + @media (max-width: 1199px) { ul.banner-social-buttons { float: left; From 707d8e737069c91aa3e7463cbbb0c118f064cfdc Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Sun, 11 Jun 2017 05:14:20 +0530 Subject: [PATCH 04/26] Added condition to hosting form to show message for account that have not yet been validated after account creation --- hosting/forms.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hosting/forms.py b/hosting/forms.py index 1c7f7e88..d9a3b985 100644 --- a/hosting/forms.py +++ b/hosting/forms.py @@ -24,6 +24,8 @@ class HostingUserLoginForm(forms.Form): is_auth = authenticate(email=email, password=password) if not is_auth: raise forms.ValidationError("Your username and/or password were incorrect.") + elif is_auth.validated == 0: + raise forms.ValidationError(_("Your account is not activated yet.")) return self.cleaned_data def clean_email(self): From ce11524fbaf8eba6a175054cf0553234ff24e82b Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Sun, 11 Jun 2017 05:15:48 +0530 Subject: [PATCH 05/26] Added signup-validate and validate endpoints to hosting's urls --- hosting/urls.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hosting/urls.py b/hosting/urls.py index 959eedf0..495ac312 100644 --- a/hosting/urls.py +++ b/hosting/urls.py @@ -1,7 +1,7 @@ from django.conf.urls import url from .views import DjangoHostingView, RailsHostingView, PaymentVMView,\ - NodeJSHostingView, LoginView, SignupView, IndexView, \ + NodeJSHostingView, LoginView, SignupView, SignupValidateView, SignupValidatedView, IndexView, \ OrdersHostingListView, OrdersHostingDetailView, VirtualMachinesPlanListView,\ VirtualMachineView, OrdersHostingDeleteView, NotificationsView, \ MarkAsReadNotificationView, PasswordResetView, PasswordResetConfirmView, HostingPricingView,\ @@ -35,9 +35,11 @@ urlpatterns = [ name='read_notification'), url(r'login/?$', LoginView.as_view(), name='login'), url(r'signup/?$', SignupView.as_view(), name='signup'), + url(r'signup-validate/?$', SignupValidateView.as_view(), name='signup-validate'), url(r'reset-password/?$', PasswordResetView.as_view(), name='reset_password'), url(r'reset-password-confirm/(?P[0-9A-Za-z]+)-(?P.+)/$', PasswordResetConfirmView.as_view(), name='reset_password_confirm'), url(r'^logout/?$', 'django.contrib.auth.views.logout', - {'next_page': '/hosting/login?logged_out=true'}, name='logout') + {'next_page': '/hosting/login?logged_out=true'}, name='logout'), + url(r'^validate/(?P.*)/$', SignupValidatedView.as_view(), name='validate') ] From c989017a8f349ec4b2369bd8a9ac2b478a71d751 Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Sun, 11 Jun 2017 05:18:06 +0530 Subject: [PATCH 06/26] Added SignupValidateView and SignupValidatedView classes to handle respective views --- hosting/views.py | 38 +++++++++++++++++++++++++++++++++----- 1 file changed, 33 insertions(+), 5 deletions(-) diff --git a/hosting/views.py b/hosting/views.py index 7e15ac2a..b23d286b 100644 --- a/hosting/views.py +++ b/hosting/views.py @@ -18,7 +18,7 @@ from guardian.mixins import PermissionRequiredMixin from stored_messages.settings import stored_messages_settings from stored_messages.models import Message from stored_messages.api import mark_read - +from django.utils.safestring import mark_safe from membership.models import CustomUser, StripeCustomer from utils.stripe_utils import StripeUtils @@ -32,6 +32,7 @@ from .mixins import ProcessVMSelectionMixin from opennebula_api.models import OpenNebulaManager from opennebula_api.serializers import VirtualMachineSerializer,\ VirtualMachineTemplateSerializer +from django.utils.translation import ugettext_lazy as _ from oca.exceptions import OpenNebulaException @@ -199,12 +200,39 @@ 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) - CustomUser.register(name, password, email) - auth_user = authenticate(email=email, password=password) - login(self.request, auth_user) + return HttpResponseRedirect(reverse_lazy('hosting:signup-validate')) - return HttpResponseRedirect(self.get_success_url()) +class SignupValidateView(TemplateView): + template_name = "hosting/signup_validate.html" + + def get_context_data(self, **kwargs): + context = super(SignupValidateView, self).get_context_data(**kwargs) + login_url = reverse('hosting:login') + message= _("Thank you for signing up. We have sent an email to you. Please follow the instructions in it to activate your account. Once activated, you can login using ") + 'login' + section_title='Sign up' + context['message'] = mark_safe(message) + context['section_title'] = section_title + return context + +class SignupValidatedView(SignupValidateView): + template_name = "hosting/signup_validate.html" + + def get_context_data(self, **kwargs): + context = super(SignupValidateView, self).get_context_data(**kwargs) + validated = CustomUser.validate_url(self.kwargs['validate_slug']) + login_url = reverse('hosting:login') + if validated: + message= _("Your account has been activated. You can now ") + 'login' + section_title=_('Account activation') + else: + message= _("Sorry. Your request is invalid.") + 'login' + section_title=_('Account activation') + context['message'] = mark_safe(message) + context['section_title'] = section_title + return context class PasswordResetView(PasswordResetViewMixin): From 2ec2b6980a2cfbecffde2ee519e68e16aeb0f4ac Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Sun, 11 Jun 2017 05:19:56 +0530 Subject: [PATCH 07/26] Updated the CustomUser.register method so that we can handle register differently for digitalglarus and dcl --- membership/models.py | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/membership/models.py b/membership/models.py index c200b960..ecb55e88 100644 --- a/membership/models.py +++ b/membership/models.py @@ -1,8 +1,4 @@ from datetime import datetime - - - - from django.db import models from django.utils.translation import ugettext_lazy as _ from django.contrib.auth.models import User, AbstractBaseUser, BaseUserManager, AbstractUser, PermissionsMixin @@ -13,6 +9,8 @@ from django.contrib.sites.models import Site from utils.stripe_utils import StripeUtils from utils.mailer import DigitalGlarusRegistrationMailer +from django.core.urlresolvers import reverse +from utils.mailer import BaseEmail REGISTRATION_MESSAGE = {'subject': "Validation mail", 'message': 'Please validate Your account under this link http://localhost:8000/en-us/digitalglarus/login/validate/{}', @@ -75,13 +73,27 @@ class CustomUser(AbstractBaseUser, PermissionsMixin): REQUIRED_FIELDS = ['name', 'password'] @classmethod - def register(cls, name, password, email): + def register(cls, name, password, email, app='digital_glarus', base_url=None): user = cls.objects.filter(email=email).first() if not user: user = cls.objects.create_user(name=name, email=email, password=password) if user: - dg = DigitalGlarusRegistrationMailer(user.validation_slug) - dg.send_mail(to=user.email) + if app == 'digital_glarus': + dg = DigitalGlarusRegistrationMailer(user.validation_slug) + dg.send_mail(to=user.email) + elif app == 'dcl': + user.is_active = False + email_data = { + 'subject': _('Activate your datacenterlight account'), + 'from_address': '(datacenterlight) datacenterlight Support ', + 'to': user.email, + 'context': {'base_url' : base_url, + 'activation_link' : reverse('hosting:validate', kwargs={'validate_slug': user.validation_slug})}, + 'template_name': 'user_activation', + 'template_path': 'datacenterlight/emails/' + } + email = BaseEmail(**email_data) + email.send() return user else: return None From d84496b0debbbf6b23764a519459c9698f9f3293 Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Mon, 12 Jun 2017 20:42:17 +0530 Subject: [PATCH 08/26] Added 'site' parameter to PasswordResetViewMixin so that we can differentiate from which site we have requested a password reset. --- hosting/views.py | 1 + utils/views.py | 3 +++ 2 files changed, 4 insertions(+) diff --git a/hosting/views.py b/hosting/views.py index 7e15ac2a..cc8f9005 100644 --- a/hosting/views.py +++ b/hosting/views.py @@ -208,6 +208,7 @@ class SignupView(CreateView): class PasswordResetView(PasswordResetViewMixin): + site='dcl' template_name = 'hosting/reset_password.html' form_class = PasswordResetRequestForm success_url = reverse_lazy('hosting:login') diff --git a/utils/views.py b/utils/views.py index b547506f..44a0322c 100644 --- a/utils/views.py +++ b/utils/views.py @@ -66,6 +66,7 @@ class PasswordResetViewMixin(FormView): # template_name = 'hosting/reset_password.html' # form_class = PasswordResetRequestForm success_message = "The link to reset your email has been sent to your email" + site = '' # success_url = reverse_lazy('hosting:login') def test_generate_email_context(self, user): @@ -94,6 +95,8 @@ class PasswordResetViewMixin(FormView): 'template_name': 'password_reset_email', 'template_path': self.template_email_path } + if self.site == 'dcl': + email_data['from_address'] = '(datacenterlight) datacenterlight Support ' email = BaseEmail(**email_data) email.send() From a2a3cc1f5ab4eb9b788d4ee105ad131a0b6b1646 Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Mon, 12 Jun 2017 20:51:48 +0530 Subject: [PATCH 09/26] Small code formatting --- hosting/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hosting/views.py b/hosting/views.py index cc8f9005..03b19b8c 100644 --- a/hosting/views.py +++ b/hosting/views.py @@ -208,7 +208,7 @@ class SignupView(CreateView): class PasswordResetView(PasswordResetViewMixin): - site='dcl' + site = 'dcl' template_name = 'hosting/reset_password.html' form_class = PasswordResetRequestForm success_url = reverse_lazy('hosting:login') From 3c5cf3f9ec990428bcd6097e67ef1d91b665fe01 Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Tue, 13 Jun 2017 23:47:57 +0530 Subject: [PATCH 10/26] Rearranged navbar menu items --- hosting/templates/hosting/base_short.html | 24 ++++++++++------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/hosting/templates/hosting/base_short.html b/hosting/templates/hosting/base_short.html index 6eda1870..fba047c6 100644 --- a/hosting/templates/hosting/base_short.html +++ b/hosting/templates/hosting/base_short.html @@ -60,9 +60,6 @@ @@ -46,7 +44,7 @@
-

{% trans "What is it" %}

+

{% trans "Highlights" %}

    @@ -149,6 +147,9 @@
    15 CHF/{% trans "month" %} +
    +

    {% trans "VAT included" %}

    +
    @@ -207,25 +208,7 @@
    - - -
    diff --git a/datacenterlight/templates/datacenterlight/order.html b/datacenterlight/templates/datacenterlight/order.html index f6caff6a..b646ef89 100644 --- a/datacenterlight/templates/datacenterlight/order.html +++ b/datacenterlight/templates/datacenterlight/order.html @@ -24,6 +24,9 @@
    15 CHF +
    +

    {% trans "VAT included" %}

    +
    diff --git a/datacenterlight/templates/datacenterlight/pricing.html b/datacenterlight/templates/datacenterlight/pricing.html index 3016dc3a..bfda4054 100644 --- a/datacenterlight/templates/datacenterlight/pricing.html +++ b/datacenterlight/templates/datacenterlight/pricing.html @@ -24,6 +24,9 @@
    15 CHF +
    +

    {% trans "VAT included" %}

    +
    From fb860b9a8dfe76e23ec066dc1e70232b8c0b760a Mon Sep 17 00:00:00 2001 From: Henry Bravo Date: Wed, 14 Jun 2017 17:16:43 -0500 Subject: [PATCH 12/26] fixed typo and delete .mo --- datacenterlight/locale/de/LC_MESSAGES/django.mo | Bin 5886 -> 0 bytes .../templates/datacenterlight/index.html | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) delete mode 100644 datacenterlight/locale/de/LC_MESSAGES/django.mo diff --git a/datacenterlight/locale/de/LC_MESSAGES/django.mo b/datacenterlight/locale/de/LC_MESSAGES/django.mo deleted file mode 100644 index faa4860d302b263b0f22827bf05e23cd9c4920ca..0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SgN*bWGdsq zp4%xdoELgr0@Kw-GVj&T44A7Ls&bm>;M>RyQZ>8WMe_0khTkvRYh8lE^4uo^SFkUo zE0t3v1KS|S1~h_&B%MHGK~o+|nHMh^978(Jj!7qQOm&9qk!I*MYE^er zJCp$yL+O;_pD!rRFbglB8U|{qLfzR#<}yinlQM6LW4>N@hHPYTydSg}!>K9Wwu92l zAS=qG7D!p~ndv85;n}IS7UQV>K2AMD^*NxebYI$7)l7G+k$X_$u>r2i(VQ^ z%D73T!txmQM#(Al*C(%J>+B+7XJzK6;$6y7$vJAGhoi}J5VE}C19F2iotmb#gx@k)qE_8fnemP{)kwm z!(8;l&V3nt7Ow3Mojqc~FLjEMRsD2!iP9pKu30b`X1QchRgrz6qy;$T0G%jKj9#yigAPR%3>x! kM-TE0V;-&A%Q6)~mp0Xc70*H`2LFW?$-Lc8`1eNeA7fcN#{d8T diff --git a/datacenterlight/templates/datacenterlight/index.html b/datacenterlight/templates/datacenterlight/index.html index abfd6644..6d63b29b 100755 --- a/datacenterlight/templates/datacenterlight/index.html +++ b/datacenterlight/templates/datacenterlight/index.html @@ -12,7 +12,7 @@
    -

    DatavCenter Light

    +

    Data Center Light

    {% trans "Finally, an affordable VM hosting in Switzerland!" %}


      From 739a92505df9b7f1f32ec8c0103ea2c9871a6c2f Mon Sep 17 00:00:00 2001 From: Henry Bravo Date: Wed, 14 Jun 2017 17:29:26 -0500 Subject: [PATCH 13/26] deleted home.htm --- .../templates/datacenterlight/home.html | 212 ------------------ 1 file changed, 212 deletions(-) delete mode 100755 datacenterlight/templates/datacenterlight/home.html diff --git a/datacenterlight/templates/datacenterlight/home.html b/datacenterlight/templates/datacenterlight/home.html deleted file mode 100755 index 84785b05..00000000 --- a/datacenterlight/templates/datacenterlight/home.html +++ /dev/null @@ -1,212 +0,0 @@ -{% extends "datacenterlight/base.html" %} -{% load staticfiles i18n%} -{% get_current_language as LANGUAGE_CODE %} - -{% block content %} - -
      -
      - -
      -
      - -
      -

      DataCenterLight

      -

      {% trans "Finally, an affordable VM hosting in Switzerland!" %}

      -
      - -
      -
      -
      - -
      - - -
      - - - -
      - -
      -
      -
      - -
      -
      -
      -
      -

      {% trans "What is it" %}

      -
      -
      -

      {% trans "Our data center" %}

      - -
      -
      -
        -
      • - -

        {% trans "Reuses existing factory halls instead of building a new expensive building." %} -

        -
      • -
      • - -

        {% trans "Only wants you to pay for what you actually need." %}

        -
      • -
      • - -

        {% trans "Is creative, using a modern and alternative design for a data center in order to make it more sustainable and affordable at the same time." %}

        -
      • -
      • - -

        {% trans "Cuts down the costs for you by using FOSS (Free Open Source Software) exclusively, wherefore we can save money from paying licenses." %}

        -
      • -
      - -
      -
      -
      -
      -
      - - -
      - -
      - -
      -
      -
      -
      -
      -

      {% trans "Scale out" %}

      -
      -
      -

      {% trans "We don't use special hardware. We use commodity hardware: we buy computers that you buy. Just many more and put them in a cozy home for computers called data center." %}

      - -
      -
      -
      -
      - -
      -
      -
      - - -
      -
      - -
      -
      -
      - -
      -
      -
      -
      -

      {% trans "Reliable and light" %}

      -
      -
      -

      {% trans "Our VMs are located in Switzerland, with reliable power supply and fast internet connection. Our VM costs less thanks to our featherlight infrastructure." %}

      - -
      -
      -
      -
      -
      - - -
      - - -
      - -
      - -
      -
      -

      {% trans "We are cutting down the costs significantly!" %}

      -

      {% trans "Affordable VM hosting based in Switzerland" %}

      -
      - -
      -
      -
      -
      -

      {% trans "VM hosting" %}

      -
      -
      - 15 CHF/month -
      -
      -
      -

      {% trans "Based in Switzerland" %}

      -
      -
      -

      1 Core,

      -
      -
      -

      2 GB RAM,

      -
      -
      -

      {% trans "10 GB Storage (SSD)" %}

      -
      -
      - {% trans "Order Now!" %} -
      - -
      - -
      -
      -
      - -
      -
      -
      -
      -
      - -
      -
      -
      -

      ungleich GmbH

      -
      -
      -

      info@datacenterlight.ch

      -

      In der Au 7, Schwanden 8762

      -

      {% trans "Switzerland " %}

      -
      - -
      -
      -
      -
      -

      {% trans "Questions?" %} {% trans "Contact us!" %}

      -
      -
      -
      - -
      -
      - -
      -{% endblock %} From 7992e39962b2dd5d24f828993e84a5e5df5b6bf0 Mon Sep 17 00:00:00 2001 From: Henry Bravo Date: Wed, 14 Jun 2017 17:34:26 -0500 Subject: [PATCH 14/26] Generated .po --- .../locale/de/LC_MESSAGES/django.po | 260 ++++++++---------- 1 file changed, 116 insertions(+), 144 deletions(-) diff --git a/datacenterlight/locale/de/LC_MESSAGES/django.po b/datacenterlight/locale/de/LC_MESSAGES/django.po index 8b5fef3c..f4228242 100644 --- a/datacenterlight/locale/de/LC_MESSAGES/django.po +++ b/datacenterlight/locale/de/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-06-14 16:49-0500\n" +"POT-Creation-Date: 2017-06-14 17:33-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -75,149 +75,6 @@ msgstr "" msgid "Thank you!" msgstr "Vielen Dank!" -#: templates/datacenterlight/home.html:15 -#: templates/datacenterlight/index.html:16 -msgid "Finally, an affordable VM hosting in Switzerland!" -msgstr "Endlich: bezahlbares VM Hosting in der Schweiz" - -#: templates/datacenterlight/home.html:19 -msgid "What is it?" -msgstr "" - -#: templates/datacenterlight/home.html:22 -#: templates/datacenterlight/index.html:23 -msgid "I want it!" -msgstr "Das will ich haben!" - -#: templates/datacenterlight/home.html:46 -msgid "What is it" -msgstr "" - -#: templates/datacenterlight/home.html:49 -msgid "Our data center" -msgstr "Unser Datacenter" - -#: templates/datacenterlight/home.html:56 -#: templates/datacenterlight/index.html:53 -msgid "" -"Reuses existing factory halls instead of building a new expensive building." -msgstr "" -"Verwendet ehemalige Fabrikhallen anstatt ein neues, teures Gebäude zu " -"errichten.
" - -#: templates/datacenterlight/home.html:61 -#: templates/datacenterlight/index.html:58 -msgid "Only wants you to pay for what you actually need." -msgstr "" -"Möchte, dass du nur bezahlst, was du auch wirklich brauchst: Wähle deine " -"Ressourcen individuell aus!
" - -#: templates/datacenterlight/home.html:65 -#: templates/datacenterlight/index.html:62 -msgid "" -"Is creative, using a modern and alternative design for a data center in " -"order to make it more sustainable and affordable at the same time." -msgstr "" -"Ist kreativ, indem es sich ein modernes und alternatives Layout zu Nutze " -"macht um Nachhaltigkeit zu fördern und somit erschwingliche Preise bieten zu " -"können.
" - -#: templates/datacenterlight/home.html:69 -#: templates/datacenterlight/index.html:66 -msgid "" -"Cuts down the costs for you by using FOSS (Free Open Source Software) " -"exclusively, wherefore we can save money from paying licenses." -msgstr "" -"Sorgt dafür, dass unnötige Kosten erspart werden, indem es ausschliesslich " -"mit FOSS (Free Open Source Software) arbeitet und wir daher auf " -"Lizenzgebühren verzichten können.
" - -#: templates/datacenterlight/home.html:89 -#: templates/datacenterlight/includes/_footer.html:14 -#: templates/datacenterlight/includes/_footer.html:34 -#: templates/datacenterlight/includes/_navbar.html:30 -#: templates/datacenterlight/index.html:86 -msgid "Scale out" -msgstr "Skalierung" - -#: templates/datacenterlight/home.html:92 -#: templates/datacenterlight/index.html:89 -msgid "" -"We don't use special hardware. We use commodity hardware: we buy computers " -"that you buy. Just many more and put them in a cozy home for computers " -"called data center." -msgstr "" -"Wir benutzen keine spezielle Hardware, sondern am Markt verfügbare, " -"erschwingliche Systeme. Bei grösserer Auslastung werden mehr " -"Standardkomponenten hinzugekauft und skalieren so das Datencenter." - -#: templates/datacenterlight/home.html:115 -#: templates/datacenterlight/includes/_footer.html:17 -#: templates/datacenterlight/includes/_footer.html:37 -#: templates/datacenterlight/includes/_navbar.html:33 -#: templates/datacenterlight/index.html:112 -msgid "Reliable and light" -msgstr "Zuverlässig und leicht" - -#: templates/datacenterlight/home.html:118 -#: templates/datacenterlight/index.html:115 -msgid "" -"Our VMs are located in Switzerland, with reliable power supply and fast " -"internet connection. Our VM costs less thanks to our featherlight " -"infrastructure." -msgstr "" -"Unser Datacenter befindet sich in der Schweiz und ist mit zuverlässiger " -"Energieversorgung, sowie schneller Internetverbindung ausgestattet. Unser " -"Angebot ist aufgrund unserer leichten Infrastruktur überaus kostengünstig." - -#: templates/datacenterlight/home.html:136 -#: templates/datacenterlight/order.html:9 -#: templates/datacenterlight/pricing.html:9 -msgid "We are cutting down the costs significantly!" -msgstr "Wir sorgen dafür, dass die Kosten für Dich signifikant abnehmen" - -#: templates/datacenterlight/home.html:137 -#: templates/datacenterlight/index.html:134 -msgid "Affordable VM hosting based in Switzerland" -msgstr "Bezahlbares VM Hosting in der Schweiz" - -#: templates/datacenterlight/home.html:144 -#: templates/datacenterlight/index.html:145 -#: templates/datacenterlight/order.html:22 -#: templates/datacenterlight/pricing.html:22 -msgid "VM hosting" -msgstr "" - -#: templates/datacenterlight/home.html:151 -msgid "Based in Switzerland" -msgstr "Starndort: Schweiz" - -#: templates/datacenterlight/home.html:160 -msgid "10 GB Storage (SSD)" -msgstr "10 GB Storage (SSD)" - -#: templates/datacenterlight/home.html:163 -#: templates/datacenterlight/index.html:197 -#: templates/datacenterlight/order.html:77 -#: templates/datacenterlight/pricing.html:79 -msgid "Order Now!" -msgstr "Bestelle jetzt!" - -#: templates/datacenterlight/home.html:186 -#: templates/datacenterlight/index.html:226 -msgid "Switzerland " -msgstr "Schweiz" - -#: templates/datacenterlight/home.html:203 -#: templates/datacenterlight/index.html:243 -msgid "Questions?" -msgstr "Fragen?" - -#: templates/datacenterlight/home.html:203 -#: templates/datacenterlight/index.html:243 -msgid "Contact us!" -msgstr "Kontaktiere uns!" - #: templates/datacenterlight/includes/_footer.html:11 #: templates/datacenterlight/includes/_footer.html:31 #: templates/datacenterlight/includes/_navbar.html:27 @@ -226,6 +83,20 @@ msgstr "Kontaktiere uns!" msgid "Highlights" msgstr "" +#: templates/datacenterlight/includes/_footer.html:14 +#: templates/datacenterlight/includes/_footer.html:34 +#: templates/datacenterlight/includes/_navbar.html:30 +#: templates/datacenterlight/index.html:86 +msgid "Scale out" +msgstr "Skalierung" + +#: templates/datacenterlight/includes/_footer.html:17 +#: templates/datacenterlight/includes/_footer.html:37 +#: templates/datacenterlight/includes/_navbar.html:33 +#: templates/datacenterlight/index.html:112 +msgid "Reliable and light" +msgstr "Zuverlässig und leicht" + #: templates/datacenterlight/includes/_footer.html:20 #: templates/datacenterlight/includes/_navbar.html:36 msgid "Order VM" @@ -245,6 +116,65 @@ msgstr "Home" msgid "Pricing" msgstr "Preise" +#: templates/datacenterlight/index.html:16 +msgid "Finally, an affordable VM hosting in Switzerland!" +msgstr "Endlich: bezahlbares VM Hosting in der Schweiz" + +#: templates/datacenterlight/index.html:23 +msgid "I want it!" +msgstr "Das will ich haben!" + +#: templates/datacenterlight/index.html:53 +msgid "" +"Reuses existing factory halls instead of building a new expensive building." +msgstr "" +"Verwendet ehemalige Fabrikhallen anstatt ein neues, teures Gebäude zu " +"errichten.
" + +#: templates/datacenterlight/index.html:58 +msgid "Only wants you to pay for what you actually need." +msgstr "" +"Möchte, dass du nur bezahlst, was du auch wirklich brauchst: Wähle deine " +"Ressourcen individuell aus!
" + +#: templates/datacenterlight/index.html:62 +msgid "" +"Is creative, using a modern and alternative design for a data center in " +"order to make it more sustainable and affordable at the same time." +msgstr "" +"Ist kreativ, indem es sich ein modernes und alternatives Layout zu Nutze " +"macht um Nachhaltigkeit zu fördern und somit erschwingliche Preise bieten zu " +"können.
" + +#: templates/datacenterlight/index.html:66 +msgid "" +"Cuts down the costs for you by using FOSS (Free Open Source Software) " +"exclusively, wherefore we can save money from paying licenses." +msgstr "" +"Sorgt dafür, dass unnötige Kosten erspart werden, indem es ausschliesslich " +"mit FOSS (Free Open Source Software) arbeitet und wir daher auf " +"Lizenzgebühren verzichten können.
" + +#: templates/datacenterlight/index.html:89 +msgid "" +"We don't use special hardware. We use commodity hardware: we buy computers " +"that you buy. Just many more and put them in a cozy home for computers " +"called data center." +msgstr "" +"Wir benutzen keine spezielle Hardware, sondern am Markt verfügbare, " +"erschwingliche Systeme. Bei grösserer Auslastung werden mehr " +"Standardkomponenten hinzugekauft und skalieren so das Datencenter." + +#: templates/datacenterlight/index.html:115 +msgid "" +"Our VMs are located in Switzerland, with reliable power supply and fast " +"internet connection. Our VM costs less thanks to our featherlight " +"infrastructure." +msgstr "" +"Unser Datacenter befindet sich in der Schweiz und ist mit zuverlässiger " +"Energieversorgung, sowie schneller Internetverbindung ausgestattet. Unser " +"Angebot ist aufgrund unserer leichten Infrastruktur überaus kostengünstig." + #: templates/datacenterlight/index.html:133 #: templates/datacenterlight/order.html:87 #: templates/datacenterlight/pricing.html:86 @@ -253,6 +183,16 @@ msgstr "" "Einfach und bezahlbar: Teste nun unsere virtuellen Maschinen mit " "federleichten Preisen." +#: templates/datacenterlight/index.html:134 +msgid "Affordable VM hosting based in Switzerland" +msgstr "Bezahlbares VM Hosting in der Schweiz" + +#: templates/datacenterlight/index.html:145 +#: templates/datacenterlight/order.html:22 +#: templates/datacenterlight/pricing.html:22 +msgid "VM hosting" +msgstr "" + #: templates/datacenterlight/index.html:149 msgid "month" msgstr "Monat" @@ -291,6 +231,29 @@ msgstr "E-Mail-Adresse" msgid "Your Email" msgstr "Deine E-Mail" +#: templates/datacenterlight/index.html:197 +#: templates/datacenterlight/order.html:77 +#: templates/datacenterlight/pricing.html:79 +msgid "Order Now!" +msgstr "Bestelle jetzt!" + +#: templates/datacenterlight/index.html:226 +msgid "Switzerland " +msgstr "Schweiz" + +#: templates/datacenterlight/index.html:243 +msgid "Questions?" +msgstr "Fragen?" + +#: templates/datacenterlight/index.html:243 +msgid "Contact us!" +msgstr "Kontaktiere uns!" + +#: templates/datacenterlight/order.html:9 +#: templates/datacenterlight/pricing.html:9 +msgid "We are cutting down the costs significantly!" +msgstr "Wir sorgen dafür, dass die Kosten für Dich signifikant abnehmen" + #: templates/datacenterlight/order.html:90 #: templates/datacenterlight/pricing.html:89 msgid "" @@ -318,6 +281,15 @@ msgstr "" msgid "as soon as possible!" msgstr "" +#~ msgid "Our data center" +#~ msgstr "Unser Datacenter" + +#~ msgid "Based in Switzerland" +#~ msgstr "Starndort: Schweiz" + +#~ msgid "10 GB Storage (SSD)" +#~ msgstr "10 GB Storage (SSD)" + #~ msgid "Want to know more? Subscribe to our newsletter!" #~ msgstr "Willst du mehr wissen? Abonniere unseren Newsletter!" From 0b034ec2f8a9729f41e0f3a74500ccc191908809 Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Thu, 15 Jun 2017 04:29:57 +0530 Subject: [PATCH 15/26] Fixed typo 'Standort' instead of 'Strandort' --- datacenterlight/locale/de/LC_MESSAGES/django.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datacenterlight/locale/de/LC_MESSAGES/django.po b/datacenterlight/locale/de/LC_MESSAGES/django.po index f4228242..89c4f4ff 100644 --- a/datacenterlight/locale/de/LC_MESSAGES/django.po +++ b/datacenterlight/locale/de/LC_MESSAGES/django.po @@ -207,7 +207,7 @@ msgstr "MwSt. inklusive" #: templates/datacenterlight/order.html:33 #: templates/datacenterlight/pricing.html:33 msgid "Hosted in Switzerland" -msgstr "Starndort: Schweiz" +msgstr "Standort: Schweiz" #: templates/datacenterlight/index.html:173 #: templates/datacenterlight/order.html:50 From fcbeefb1d9094b50f17a161a1d68e2608d8da74a Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Thu, 15 Jun 2017 05:19:00 +0530 Subject: [PATCH 16/26] Updated the changelog --- Changelog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Changelog b/Changelog index db5482c8..436a3e86 100644 --- a/Changelog +++ b/Changelog @@ -1,3 +1,8 @@ +1.0.16: 2017-06-15 + * [datacenterlight] .po file issue with multiple definition fixed + * [datacenterlight] Navbar items in dcl user area rearranged + * [datacenterlight] Typos in german fixed (#3364) + * [datacenterlight] Added "VAT included" text in calculator box 1.0.15: 2017-06-14 * [datacenterlight] Fixed error trying to delete ssh key * [datacenterlight] Fixed footer links From a56d08e729dabd9bab1cb888dfd810d43021dd51 Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Thu, 15 Jun 2017 06:29:31 +0530 Subject: [PATCH 17/26] Fixed translations of validation messages --- datacenterlight/locale/de/LC_MESSAGES/django.po | 16 ++++++++++++---- .../templates/datacenterlight/base.html | 6 ++++-- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/datacenterlight/locale/de/LC_MESSAGES/django.po b/datacenterlight/locale/de/LC_MESSAGES/django.po index 89c4f4ff..0cb11484 100644 --- a/datacenterlight/locale/de/LC_MESSAGES/django.po +++ b/datacenterlight/locale/de/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-06-14 17:33-0500\n" +"POT-Creation-Date: 2017-06-15 06:09+0530\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -18,6 +18,14 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#: templates/datacenterlight/base.html:86 +msgid "Please enter your name" +msgstr "Bitte geben Sie Ihren Namen ein" + +#: templates/datacenterlight/base.html:87 +msgid "Please enter a valid email address" +msgstr "Bitte geben Sie eine gültige E-Mail-Adresse ein" + #: templates/datacenterlight/beta_access.html:13 msgid "Enter name" msgstr "Name" @@ -281,6 +289,9 @@ msgstr "" msgid "as soon as possible!" msgstr "" +#~ msgid "Buy VM" +#~ msgstr "VM Kaufen" + #~ msgid "Our data center" #~ msgstr "Unser Datacenter" @@ -296,9 +307,6 @@ msgstr "" #~ msgid "I want to have it!" #~ msgstr "Das möchte ich haben!" -#~ msgid "Buy VM" -#~ msgstr "VM Kaufen" - #~ msgid "" #~ "Reuse existing factory halls intead of building an expensive building." #~ msgstr "" diff --git a/datacenterlight/templates/datacenterlight/base.html b/datacenterlight/templates/datacenterlight/base.html index 06fcd804..c62d92f7 100644 --- a/datacenterlight/templates/datacenterlight/base.html +++ b/datacenterlight/templates/datacenterlight/base.html @@ -69,6 +69,8 @@ ignore: [] }); + var name_message = "{% trans 'Please enter your name' %}"; + var email_message = "{% trans 'Please enter a valid email address' %}"; $('#order_form').validate({ wrapper: 'div', errorLabelContainer: "#error_message_box", @@ -83,8 +85,8 @@ } }, messages: { - name: "Please enter your name", - email: "Please enter a valid email address" + name: name_message, + email: email_message }, submitHandler: function (form) { return true; From e9643c4783cf156d3d2b4aaf75b0f90aaf333d4a Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Thu, 15 Jun 2017 07:16:05 +0530 Subject: [PATCH 18/26] Deleted django.mo of hosting --- hosting/locale/de/LC_MESSAGES/django.mo | Bin 5794 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 hosting/locale/de/LC_MESSAGES/django.mo diff --git a/hosting/locale/de/LC_MESSAGES/django.mo b/hosting/locale/de/LC_MESSAGES/django.mo deleted file mode 100644 index 1a9bb493dec8c012747c53e56f2afdd0f4aa65c5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5794 zcmb7{X^b346~~JlKpe}AHtQqUS=+H^cW3R5cXl^>IktjO&rI!1XJ)!5 zeeAO9NC*)Lgb0a(Kt_T{k)jCkAwnPmNRB`(por@WAwnPpJ|Kl4K#@S?ON99SyL_AFNZ&Y*Td)G zZuoone)!h6Q=oibE!1D=7> z%Q>j=&ck=ZZ@~A#=b+^HZSnqPsPSKelK*umd9Py7cfsqS-tUB(cNf(9_7?SnP~Y8M z)K5W%Ff&l!-(Ro?rH_Z9*7rEP5k3hu-*d(LpF(~28~6eEGSoUQL;2!%sQx!W$*~Kn z{~){pju!Qg!}m~s5K3>Kh5GKXqJADqjwhk~;al*-@aItLd<9BxuR=sHSF%WrcOAS3 z-U6k^2cg#c8Aw<22)qt{6>8pZ!sGBeQ1ko?o`%<;j1R#@DES|T((`$!@4gP(Z^6Id zcIw+%d}aqIJMMxv!(q4+E<(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kZPMdLQE*!Gkrl;mgS-9h)k|NiT-8Z=RU}^Bq(*8lacmL3VgS!X0=vbOz zIt^a*J5wpol&Vvu(Xu@`HB=qneRgWHvTcH`RGN#tAjYA?XvmJuPfXa!a$?nyJ@xr8(zyhwMao^2EGEJ~A>au)lhh2b^ z6A@Yo*(SgpvdpWLL9#8ftRK`nsbf>(v-0Q$6D@}{2iBBp zk*l|YT-2H3G4`_D>xgFgySSE5eJXMdKWP(sTo4dWm0t5Cto%q44jT?JvnjNwgvlA& zk{Q{YtSd0HsLdxR@OWxVPNtT4ZIVgY%X{L~t8^s$xF~RBhBV8_l_(pQ6x2l(`TC;# z9J8rTd{k0Cm1?!h$SJ*RO(JoN2b4BB4LTlJH*rxJ5I*OPRd zsdUq#I>jKzw9?#s>eepomaZF)Q&O$trHhSBiY=?|+d~OR={d1WE^21#IhLs^_pqMl z6=^P4O_sp*XuHgY9i`R68MD-V8bNTl#WZN^v`1H^rrelW3YUl4)wJoBF-BpQzBdP5 z*OAuB>klE&u0s$#6XY26`%b&m{k!>+$s ze}Psn*-LNGG^G?z%#*805n4DKC%{|S3F~T+2G=#fkzhl(cy>U6X70Y{7MgiY9p)-KfB#3c6lhPhX_ zG@o93s2=Q3x(vaBSXq*979es#Dxo2!NWT%%c`enP}fdtDPCW|6#&j#Aq ze(rH^vc!Pn2rk&=j}+mbKVmvDWJ?-$%bwQIUsRqTEKz768-F?FY|J0IS~J`1iOkwR z)#OK Date: Thu, 15 Jun 2017 07:30:47 +0530 Subject: [PATCH 19/26] Tentative fix for error 500 on order details page --- hosting/templates/hosting/order_detail.html | 14 ++++++++++++++ hosting/templates/hosting/orders.html | 3 +-- hosting/views.py | 11 +++++++++-- opennebula_api/models.py | 5 +++-- 4 files changed, 27 insertions(+), 6 deletions(-) diff --git a/hosting/templates/hosting/order_detail.html b/hosting/templates/hosting/order_detail.html index 7705a006..5745a93c 100644 --- a/hosting/templates/hosting/order_detail.html +++ b/hosting/templates/hosting/order_detail.html @@ -4,7 +4,20 @@ {% block content %}
      + {% if messages %}
      +
      +
      +
      + {% for message in messages %} + {{ message }} + {% endfor %} +
      +
      +
      + {% endif %} + {% if not error %} +

      {% trans "Invoice"%}

      {% trans "Order #"%} {{order.id}}

      @@ -66,5 +79,6 @@ {% endif %}
      + {% endif %}
      {%endblock%} diff --git a/hosting/templates/hosting/orders.html b/hosting/templates/hosting/orders.html index 42b77e88..b52e7fc0 100644 --- a/hosting/templates/hosting/orders.html +++ b/hosting/templates/hosting/orders.html @@ -33,9 +33,8 @@ {% endif %} -
    -
    \ No newline at end of file +
    diff --git a/hosting/templates/hosting/order_detail.html b/hosting/templates/hosting/order_detail.html index 7705a006..b691f34d 100644 --- a/hosting/templates/hosting/order_detail.html +++ b/hosting/templates/hosting/order_detail.html @@ -51,9 +51,9 @@

    {% trans "Cores"%} {{vm.cores}}


    -

    {% trans "Memory"%} {{vm.memory}} GiB

    +

    {% trans "Memory"%} {{vm.memory}} GB


    -

    {% trans "Disk space"%} {{vm.disk_size}} GiB

    +

    {% trans "Disk space"%} {{vm.disk_size}} GB


    {% trans "Total"%}

    {{vm.price}} CHF

    diff --git a/hosting/templates/hosting/payment.html b/hosting/templates/hosting/payment.html index db45c282..e41f57d7 100644 --- a/hosting/templates/hosting/payment.html +++ b/hosting/templates/hosting/payment.html @@ -18,10 +18,10 @@ class="pull-right">{{request.session.specs.cpu|floatformat}}


    {%trans "Memory"%} {{request.session.specs.memory|floatformat}} GiB

    + class="pull-right">{{request.session.specs.memory|floatformat}} GB


    {%trans "Disk space"%} {{request.session.specs.disk_size|floatformat}} GiB

    + class="pull-right">{{request.session.specs.disk_size|floatformat}} GB


    Total

    {{request.session.specs.price }} CHF

    diff --git a/hosting/templates/hosting/virtual_machine_detail.html b/hosting/templates/hosting/virtual_machine_detail.html index 11f0e4ba..441d6260 100644 --- a/hosting/templates/hosting/virtual_machine_detail.html +++ b/hosting/templates/hosting/virtual_machine_detail.html @@ -80,14 +80,14 @@
    {% trans "Memory"%}
    - {{virtual_machine.memory}} GiB + {{virtual_machine.memory}} GB
    {% trans "Disk"%} - {{virtual_machine.disk_size|floatformat:2}} GiB + {{virtual_machine.disk_size|floatformat:2}} GB
    From 6c588e353152eee53b4f0a6ccc6c7888d3c395d4 Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Thu, 15 Jun 2017 23:31:19 +0530 Subject: [PATCH 21/26] Deleted the order.html --- .../templates/datacenterlight/order.html | 98 ------------------- 1 file changed, 98 deletions(-) delete mode 100644 datacenterlight/templates/datacenterlight/order.html diff --git a/datacenterlight/templates/datacenterlight/order.html b/datacenterlight/templates/datacenterlight/order.html deleted file mode 100644 index b646ef89..00000000 --- a/datacenterlight/templates/datacenterlight/order.html +++ /dev/null @@ -1,98 +0,0 @@ -{% extends "datacenterlight/base.html" %} -{% load staticfiles i18n %} - -{% block content %} - -
    - -
    -

    {% trans "We are cutting down the costs significantly!" %}

    -
    - -
    - -
    -
    - -
    -
    - {% csrf_token %} - -
    -

    {% trans "VM hosting" %}

    -
    -
    - 15 - CHF -
    -

    {% trans "VAT included" %}

    -
    -
    -
    -
    -

    {% trans "Hosted in Switzerland" %}

    -
    -
    - - - Core - -
    -
    - - - GB RAM - -
    -
    - - - {% trans "GB Storage (SSD)" %} - -
    - - -
    - - -
    - - - -
    - - -
    -
    - - -
    -
    - - -
    -
    -
    -
    -
    -
    - -
    -

    {% trans "Simple and affordable: Try our virtual machine with featherlight price." %}

    - -
    -

    {% trans "Our VMs are hosted in Glarus, Switzerland, and our website is currently running in BETA mode. If you want more information that you did not find on our website, or if your order is more detailed, or if you encounter any technical hiccups, please contact us at support@datacenterlight.ch, our team will get in touch with you asap." %}

    -
    -
    -
    - - -{% endblock %} - - From e897bb9c22457b224d0cc88706f883f7bcdd4bb9 Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Thu, 15 Jun 2017 23:32:20 +0530 Subject: [PATCH 22/26] Removed unused /order url --- datacenterlight/urls.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/datacenterlight/urls.py b/datacenterlight/urls.py index f14e7186..aad6442e 100644 --- a/datacenterlight/urls.py +++ b/datacenterlight/urls.py @@ -1,6 +1,6 @@ from django.conf.urls import url -from .views import IndexView, BetaProgramView, LandingProgramView, BetaAccessView, PricingView, SuccessView, OrderView +from .views import IndexView, BetaProgramView, LandingProgramView, BetaAccessView, PricingView, SuccessView urlpatterns = [ @@ -8,7 +8,6 @@ urlpatterns = [ url(r'^/beta-program/?$', BetaProgramView.as_view(), name='beta'), url(r'^/landing/?$', LandingProgramView.as_view(), name='landing'), url(r'^/pricing/?$', PricingView.as_view(), name='pricing'), - url(r'^/order/?$', OrderView.as_view(), name='order'), url(r'^/order-success/?$', SuccessView.as_view(), name='order_success'), url(r'^/beta_access?$', BetaAccessView.as_view(), name='beta_access'), ] From 36567071c0ebfa2309396984c2cfd5afed7bd7da Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Thu, 15 Jun 2017 23:36:58 +0530 Subject: [PATCH 23/26] Removed OrderView as we no longer use it --- datacenterlight/views.py | 76 ++-------------------------------------- 1 file changed, 2 insertions(+), 74 deletions(-) diff --git a/datacenterlight/views.py b/datacenterlight/views.py index d23c4231..427f8c70 100644 --- a/datacenterlight/views.py +++ b/datacenterlight/views.py @@ -70,78 +70,6 @@ class PricingView(TemplateView): return redirect(reverse('hosting:payment')) -class OrderView(TemplateView): - template_name = "datacenterlight/order.html" - - def get(self, request, *args, **kwargs): - try: - manager = OpenNebulaManager() - templates = manager.get_templates() - - context = { - 'templates': VirtualMachineTemplateSerializer(templates, many=True).data, - } - except: - messages.error( request, - 'We have a temporary problem to connect to our backend. \ - Please try again in a few minutes' - ) - context = { - 'error' : 'connection' - } - - return render(request, self.template_name, context) - - def post(self, request): - - cores = request.POST.get('cpu') - memory = request.POST.get('ram') - storage = request.POST.get('storage') - price = request.POST.get('total') - template_id = int(request.POST.get('config')) - manager = OpenNebulaManager() - template = manager.get_template(template_id) - template_data = VirtualMachineTemplateSerializer(template).data - - name = request.POST.get('name') - email = request.POST.get('email') - name_field = forms.CharField() - email_field = forms.EmailField() - try: - name = name_field.clean(name) - except ValidationError as err: - messages.add_message(self.request, messages.ERROR, '%(value) is not a proper name.'.format(name)) - return HttpResponseRedirect(reverse('datacenterlight:order')) - - try: - email = email_field.clean(email) - except ValidationError as err: - messages.add_message(self.request, messages.ERROR, '%(value) is not a proper email.'.format(email)) - return HttpResponseRedirect(reverse('datacenterlight:order')) - - context = { - 'name': name, - 'email': email, - 'cores': cores, - 'memory': memory, - 'storage': storage, - 'price': price, - 'template': template_data['name'], - } - email_data = { - 'subject': "Data Center Light Order from %s" % context['email'], - 'from_address': '(datacenterlight) datacenterlight Support ', - 'to': 'info@ungleich.ch', - 'context': context, - 'template_name': 'new_order_notification', - 'template_path': 'datacenterlight/emails/' - } - email = EmailMessage(**email_data) - email.send() - - return HttpResponseRedirect(reverse('datacenterlight:order_success')) - - class BetaAccessView(FormView): template_name = "datacenterlight/beta_access.html" form_class = BetaAccessForm @@ -277,13 +205,13 @@ class IndexView(CreateView): name = name_field.clean(name) except ValidationError as err: messages.add_message(self.request, messages.ERROR, '%(value) is not a proper name.'.format(name)) - return HttpResponseRedirect(reverse('datacenterlight:order')) + return HttpResponseRedirect(reverse('datacenterlight:index')) try: email = email_field.clean(email) except ValidationError as err: messages.add_message(self.request, messages.ERROR, '%(value) is not a proper email.'.format(email)) - return HttpResponseRedirect(reverse('datacenterlight:order')) + return HttpResponseRedirect(reverse('datacenterlight:index')) context = { 'name': name, From 06af225c97705f981b44239bb0667431d4dd529b Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Fri, 16 Jun 2017 00:00:26 +0530 Subject: [PATCH 24/26] Updated proper translation corrections --- datacenterlight/locale/de/LC_MESSAGES/django.po | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/datacenterlight/locale/de/LC_MESSAGES/django.po b/datacenterlight/locale/de/LC_MESSAGES/django.po index 0cb11484..72977d27 100644 --- a/datacenterlight/locale/de/LC_MESSAGES/django.po +++ b/datacenterlight/locale/de/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-06-15 06:09+0530\n" +"POT-Creation-Date: 2017-06-15 23:57+0530\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -18,13 +18,13 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: templates/datacenterlight/base.html:86 +#: templates/datacenterlight/base.html:72 msgid "Please enter your name" -msgstr "Bitte geben Sie Ihren Namen ein" +msgstr "Bitte gib Deinen Namen ein" -#: templates/datacenterlight/base.html:87 +#: templates/datacenterlight/base.html:73 msgid "Please enter a valid email address" -msgstr "Bitte geben Sie eine gültige E-Mail-Adresse ein" +msgstr "Bitte gib eine gültige E-Mail-Adresse ein" #: templates/datacenterlight/beta_access.html:13 msgid "Enter name" From d4876cdecb8a13930fd211d684427b4d759fac91 Mon Sep 17 00:00:00 2001 From: Pcoder Date: Fri, 16 Jun 2017 00:09:11 +0530 Subject: [PATCH 25/26] Fixed the username for the from_email address --- utils/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/views.py b/utils/views.py index 6ae36f9e..039e08d8 100644 --- a/utils/views.py +++ b/utils/views.py @@ -97,7 +97,7 @@ class PasswordResetViewMixin(FormView): 'template_path': self.template_email_path } if self.site == 'dcl': - email_data['from_address'] = '(datacenterlight) datacenterlight Support ' + email_data['from_address'] = '(Data Center Light) Data Center Light Support ' email = BaseEmail(**email_data) email.send() From 8dfcca82641945c65322c709637ddfd1496f8852 Mon Sep 17 00:00:00 2001 From: Pcoder Date: Fri, 16 Jun 2017 00:47:09 +0530 Subject: [PATCH 26/26] Fixed name for dcl --- membership/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/membership/models.py b/membership/models.py index ecb55e88..8bd9feec 100644 --- a/membership/models.py +++ b/membership/models.py @@ -84,8 +84,8 @@ class CustomUser(AbstractBaseUser, PermissionsMixin): elif app == 'dcl': user.is_active = False email_data = { - 'subject': _('Activate your datacenterlight account'), - 'from_address': '(datacenterlight) datacenterlight Support ', + 'subject': _('Activate your Data Center Light account'), + 'from_address': '(Data Center Light) Data Center Light Support ', 'to': user.email, 'context': {'base_url' : base_url, 'activation_link' : reverse('hosting:validate', kwargs={'validate_slug': user.validation_slug})},