From a60ef7cf7a381683aaeea7bcfcea2542c833f08f Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Wed, 7 Jun 2017 11:35:16 +0530 Subject: [PATCH 01/21] Changed BaseEmail to accept from_address to modify the from header accordingly --- datacenterlight/views.py | 6 ++++++ utils/mailer.py | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/datacenterlight/views.py b/datacenterlight/views.py index d7b6a3e5..cb680109 100644 --- a/datacenterlight/views.py +++ b/datacenterlight/views.py @@ -133,6 +133,7 @@ class OrderView(TemplateView): } email_data = { 'subject': 'New Order Received', + 'from_address': '(datacenterlight) datacenterlight Support ', 'to': 'info@ungleich.ch', 'context': context, 'template_name': 'new_order_notification', @@ -157,6 +158,7 @@ class BetaAccessView(FormView): email_data = { 'subject': 'DatacenterLight Beta Access Request', + 'from_address': '(datacenterlight) datacenterlight Support ', 'to': form.cleaned_data.get('email'), 'context': context, 'template_name': 'request_access_confirmation', @@ -171,6 +173,7 @@ class BetaAccessView(FormView): email_data = { 'subject': 'DatacenterLight Beta Access Request', + 'from_address': '(datacenterlight) datacenterlight Support ', 'to': 'info@ungleich.ch', 'context': context, 'template_name': 'request_access_notification', @@ -221,6 +224,7 @@ class BetaProgramView(CreateView): email_data = { 'subject': 'DatacenterLight Beta Access Request', + 'from_address': '(datacenterlight) datacenterlight Support ', 'to': 'info@ungleich.ch', 'context': context, 'template_name': 'request_beta_access_notification', @@ -260,6 +264,7 @@ class IndexView(CreateView): email_data = { 'subject': 'DatacenterLight Beta Access Request', + 'from_address': '(datacenterlight) datacenterlight Support ', 'to': form.cleaned_data.get('email'), 'context': context, 'template_name': 'request_access_confirmation', @@ -274,6 +279,7 @@ class IndexView(CreateView): email_data = { 'subject': 'DatacenterLight Beta Access Request', + 'from_address': '(datacenterlight) datacenterlight Support ', 'to': 'info@ungleich.ch', 'context': context, 'template_name': 'request_access_notification', diff --git a/utils/mailer.py b/utils/mailer.py index 948cdd68..5dc24b04 100644 --- a/utils/mailer.py +++ b/utils/mailer.py @@ -21,7 +21,10 @@ class BaseEmail(object): self.email = EmailMultiAlternatives(self.subject, text_content) self.email.attach_alternative(html_content, "text/html") - self.email.from_email = '(ungleich) ungleich Support ' + if 'from_address' in kwargs: + self.email.from_email = kwargs.get('from_address') + else: + self.email.from_email = '(ungleich) ungleich Support ' self.email.to = [kwargs.get('to', 'info@ungleich.com')] def send(self): From 9f2f0f7db3e9ee87fea85b2dbdcae2fa831f0a1d Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sat, 10 Jun 2017 00:33:26 +0200 Subject: [PATCH 02/21] Send order emails as plain text --- datacenterlight/views.py | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/datacenterlight/views.py b/datacenterlight/views.py index d7b6a3e5..dfe3ae8b 100644 --- a/datacenterlight/views.py +++ b/datacenterlight/views.py @@ -4,6 +4,7 @@ from .forms import BetaAccessForm from .models import BetaAccess, BetaAccessVMType, BetaAccessVM from django.contrib import messages from django.core.urlresolvers import reverse_lazy, reverse +from django.core.mail import EmailMessage from utils.mailer import BaseEmail from django.shortcuts import render from django.shortcuts import redirect @@ -59,7 +60,7 @@ class PricingView(TemplateView): if not request.user.is_authenticated(): request.session['next'] = reverse('hosting:payment') - request.session['specs'] = { + request.session['specs'] = { 'cpu':cores, 'memory': memory, 'disk_size': storage, @@ -101,7 +102,7 @@ class OrderView(TemplateView): 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() @@ -112,17 +113,13 @@ class OrderView(TemplateView): messages.add_message(self.request, messages.ERROR, '%(value) is not a proper name.'.format(name)) return HttpResponseRedirect(reverse('datacenterlight:order')) - try: + 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')) - - # We have valid email and name of the customer, hence send an - # email to the admin - + context = { - 'base_url': "{0}://{1}".format(self.request.scheme, self.request.get_host()), 'name': name, 'email': email, 'cores': cores, @@ -132,13 +129,12 @@ class OrderView(TemplateView): 'template': template_data['name'], } email_data = { - 'subject': 'New Order Received', + 'subject': "Data Center Light Order from %s" % context['email'], 'to': 'info@ungleich.ch', - 'context': context, - 'template_name': 'new_order_notification', - 'template_path': 'datacenterlight/emails/' + 'body': "\n".join(["%s=%s" % (k, v) for (k, v) in context.items()]), + 'reply_to': context['email'], } - email = BaseEmail(**email_data) + email = EmailMessage(**email_data) email.send() return HttpResponseRedirect(reverse('datacenterlight:order_success')) From 3750ba518281271a356aa2eee17e976ff6d5cf0e Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Sat, 10 Jun 2017 12:42:31 +0530 Subject: [PATCH 03/21] Changed the to and reply-to fields for EmailMessage to list, as it expects input of that type --- datacenterlight/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/datacenterlight/views.py b/datacenterlight/views.py index dfe3ae8b..1c9fa7ec 100644 --- a/datacenterlight/views.py +++ b/datacenterlight/views.py @@ -130,9 +130,9 @@ class OrderView(TemplateView): } email_data = { 'subject': "Data Center Light Order from %s" % context['email'], - 'to': 'info@ungleich.ch', + 'to': ['info@ungleich.ch'], 'body': "\n".join(["%s=%s" % (k, v) for (k, v) in context.items()]), - 'reply_to': context['email'], + 'reply_to': [context['email']], } email = EmailMessage(**email_data) email.send() From 9b40af3975125c26fe33929ae36918393a6352d8 Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Sat, 10 Jun 2017 15:41:25 +0530 Subject: [PATCH 04/21] Removed the unnecessary new_order_notification* email templates as we no longer use them. --- .../emails/new_order_notification.html | 137 ------------------ .../emails/new_order_notification.txt | 137 ------------------ 2 files changed, 274 deletions(-) delete mode 100644 datacenterlight/templates/datacenterlight/emails/new_order_notification.html delete mode 100644 datacenterlight/templates/datacenterlight/emails/new_order_notification.txt diff --git a/datacenterlight/templates/datacenterlight/emails/new_order_notification.html b/datacenterlight/templates/datacenterlight/emails/new_order_notification.html deleted file mode 100644 index 5f14c983..00000000 --- a/datacenterlight/templates/datacenterlight/emails/new_order_notification.html +++ /dev/null @@ -1,137 +0,0 @@ -{% load static from staticfiles %} - - - - - - -Oxygen Invoice - - - - - - - - - - - - - -
-
- - -
- -
- - - -
- logo - -
-
- -
-
-
-
- - - - - - - - - - -
- We have received a new order. -
-

-

User details

- Name: {{name}}
- Email: {{email}}
- -

VM details

- Cores: {{cores}}
- Memory: {{memory}}
- Storage: {{storage}}
- Price: {{price}}
- Template: {{template}}
- -

 
-
-
-
- - -
Your data center light team
-
-
-
- - - diff --git a/datacenterlight/templates/datacenterlight/emails/new_order_notification.txt b/datacenterlight/templates/datacenterlight/emails/new_order_notification.txt deleted file mode 100644 index 5f14c983..00000000 --- a/datacenterlight/templates/datacenterlight/emails/new_order_notification.txt +++ /dev/null @@ -1,137 +0,0 @@ -{% load static from staticfiles %} - - - - - - -Oxygen Invoice - - - - - - - - - - - - - -
-
- - -
- -
- - - -
- logo - -
-
- -
-
-
-
- - - - - - - - - - -
- We have received a new order. -
-

-

User details

- Name: {{name}}
- Email: {{email}}
- -

VM details

- Cores: {{cores}}
- Memory: {{memory}}
- Storage: {{storage}}
- Price: {{price}}
- Template: {{template}}
- -

 
-
-
-
- - -
Your data center light team
-
-
-
- - - From d792c22e4e3ced3c3b5980c008c5c1ad5c3590da Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Sun, 11 Jun 2017 16:28:11 +0530 Subject: [PATCH 05/21] Created landing page style price-calc-section-landing which is same as price-calc-section except for padding (we don't need it in the landing page) --- .../datacenterlight/css/landing-page.css | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/datacenterlight/static/datacenterlight/css/landing-page.css b/datacenterlight/static/datacenterlight/css/landing-page.css index cff8063a..e7bac28f 100755 --- a/datacenterlight/static/datacenterlight/css/landing-page.css +++ b/datacenterlight/static/datacenterlight/css/landing-page.css @@ -577,6 +577,12 @@ h6 { background: linear-gradient(to bottom, #f0f4f7, #fff) no-repeat; display: flex; } +.price-calc-section-landing{ + /*padding: 80px 40px !important;*/ + background: -webkit-linear-gradient(top, #f0f4f7, #fff) no-repeat; + background: linear-gradient(to bottom, #f0f4f7, #fff) no-repeat; + display: flex; +} .price-calc-section .text{ width: 50%; } @@ -616,6 +622,18 @@ h6 { max-width: 400px; position: relative; } +.price-calc-section-landing .card{ + /*width: 50%;*/ + margin: 0 auto; + background: #fff; + box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23); + padding-bottom: 40px; + border-radius: 7px; + text-align: center; + /* margin-right: auto; */ + max-width: 400px; + position: relative; +} .price-calc-section .card .img-beta{ position: absolute; top: 5px; @@ -844,6 +862,10 @@ h6 { flex-direction: column; padding: 60px 10px !important; } + .price-calc-section-landing{ + flex-direction: column; + /*padding: 60px 10px !important;*/ + } .price-calc-section .card { width: 90%; } From 47d882d1fc70395f8e8148a4a972c4e8ae9089ac Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Sun, 11 Jun 2017 16:29:24 +0530 Subject: [PATCH 06/21] Moved the calculator to the index.html template --- .../templates/datacenterlight/index.html | 140 +++++++++++++----- 1 file changed, 102 insertions(+), 38 deletions(-) diff --git a/datacenterlight/templates/datacenterlight/index.html b/datacenterlight/templates/datacenterlight/index.html index ee2a6ac8..073ab81d 100755 --- a/datacenterlight/templates/datacenterlight/index.html +++ b/datacenterlight/templates/datacenterlight/index.html @@ -238,31 +238,69 @@
-
-
-
-

{% trans "VM hosting" %}

+
+
+ +
+
+ {% csrf_token %} +
+

{% trans "VM hosting" %}

+
+
+ 15 + CHF +
+
+
+

{% trans "Hosted in Switzerland" %}

+
+
+ + + Core + +
+
+ + + GB RAM + +
+
+ + + {% trans "GB Storage (SSD)" %} + +
+
+ + +
+ + +
+ + +
+
+ + +
+
+ +
-
- 15 CHF/month -
-
-
-

{% trans "Based in Switzerland" %}

-
-
-

1 Core,

-
-
-

2 GB RAM,

-
-
-

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

-
-
- {% trans "Order Now!" %} -
- +
+
+
+
@@ -366,22 +404,48 @@ - - + + window.onload=function(){ + $('.selectpicker').selectpicker({ + style: 'btn-link', + windowPadding: 10, + }); + $.ajax({ + url: "{% url 'datacenterlight:beta_access' %}", + context: document.body + }).done(function(response) { + $('#beta_access_form').html(response); + }); + }; + From 880e0f0dde5a742c0852e107bfaac122ca690307 Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Sun, 11 Jun 2017 16:32:38 +0530 Subject: [PATCH 07/21] Added functions to handle get and post requests. On get, we need to create a opennebula connection to fetch the templates. On successful post of the form, we need to send email and redirect user to order-success --- datacenterlight/views.py | 65 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/datacenterlight/views.py b/datacenterlight/views.py index d7b6a3e5..80b608a4 100644 --- a/datacenterlight/views.py +++ b/datacenterlight/views.py @@ -239,6 +239,71 @@ class IndexView(CreateView): form_class = BetaAccessForm success_url = "/datacenterlight#requestform" success_message = "Thank you, we will contact you as soon as possible" + + 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 = { + 'base_url': "{0}://{1}".format(self.request.scheme, self.request.get_host()), + 'name': name, + 'email': email, + 'cores': cores, + 'memory': memory, + 'storage': storage, + 'price': price, + 'template': template_data['name'], + } + email_data = { + 'subject': 'New Order Received', + 'to': 'info@ungleich.ch', + 'context': context, + 'template_name': 'new_order_notification', + 'template_path': 'datacenterlight/emails/' + } + email = BaseEmail(**email_data) + email.send() + + return HttpResponseRedirect(reverse('datacenterlight:order_success')) def get_success_url(self): success_url = reverse('datacenterlight:index') From 24402a2ec884f9f50f56163323037c574f3b159a Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Sun, 11 Jun 2017 16:53:57 +0530 Subject: [PATCH 08/21] Refactored the styles --- .../datacenterlight/css/landing-page.css | 26 ++++--------------- .../templates/datacenterlight/index.html | 4 +-- 2 files changed, 7 insertions(+), 23 deletions(-) diff --git a/datacenterlight/static/datacenterlight/css/landing-page.css b/datacenterlight/static/datacenterlight/css/landing-page.css index e7bac28f..ab601052 100755 --- a/datacenterlight/static/datacenterlight/css/landing-page.css +++ b/datacenterlight/static/datacenterlight/css/landing-page.css @@ -577,12 +577,6 @@ h6 { background: linear-gradient(to bottom, #f0f4f7, #fff) no-repeat; display: flex; } -.price-calc-section-landing{ - /*padding: 80px 40px !important;*/ - background: -webkit-linear-gradient(top, #f0f4f7, #fff) no-repeat; - background: linear-gradient(to bottom, #f0f4f7, #fff) no-repeat; - display: flex; -} .price-calc-section .text{ width: 50%; } @@ -622,17 +616,11 @@ h6 { max-width: 400px; position: relative; } -.price-calc-section-landing .card{ - /*width: 50%;*/ - margin: 0 auto; - background: #fff; - box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23); - padding-bottom: 40px; - border-radius: 7px; - text-align: center; - /* margin-right: auto; */ - max-width: 400px; - position: relative; +.price-calc-section .landing { + width: 100% !important; +} +.no-padding{ + padding:0 !important; } .price-calc-section .card .img-beta{ position: absolute; @@ -862,10 +850,6 @@ h6 { flex-direction: column; padding: 60px 10px !important; } - .price-calc-section-landing{ - flex-direction: column; - /*padding: 60px 10px !important;*/ - } .price-calc-section .card { width: 90%; } diff --git a/datacenterlight/templates/datacenterlight/index.html b/datacenterlight/templates/datacenterlight/index.html index 073ab81d..80071fac 100755 --- a/datacenterlight/templates/datacenterlight/index.html +++ b/datacenterlight/templates/datacenterlight/index.html @@ -238,8 +238,8 @@
-
-
+
+
From 8e95ed304b68d5df452e24e305086a244a405d11 Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Sun, 11 Jun 2017 16:57:20 +0530 Subject: [PATCH 09/21] Updated the text in dcl index.html template --- datacenterlight/templates/datacenterlight/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datacenterlight/templates/datacenterlight/index.html b/datacenterlight/templates/datacenterlight/index.html index 80071fac..4c47fd8f 100755 --- a/datacenterlight/templates/datacenterlight/index.html +++ b/datacenterlight/templates/datacenterlight/index.html @@ -233,7 +233,7 @@
-

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

+

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

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

From a29ceb765f774ca3c49d26205b0486d4b77cc65e Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Sun, 11 Jun 2017 17:46:42 +0530 Subject: [PATCH 10/21] Updated the translation for the modified text --- .../locale/de/LC_MESSAGES/django.mo | Bin 5456 -> 5294 bytes .../locale/de/LC_MESSAGES/django.po | 180 ++++++++---------- 2 files changed, 80 insertions(+), 100 deletions(-) diff --git a/datacenterlight/locale/de/LC_MESSAGES/django.mo b/datacenterlight/locale/de/LC_MESSAGES/django.mo index 8f00cac9740b7a5c942863c4459d14efa085cf3f..0e1ee99d9c5623899fd6c0667dc4338f570f6765 100644 GIT binary patch delta 956 zcmYk*%WD%+6vy$CCTUuergi#CYiv>b-7rGK%6bf3p5Q=o+M*jx!`@5Zmm)!Zxy_uPN&bc$oLvIJGYhL83 z(FW*g`lXQBD9$!;pxq3c4dE?3iL-bd*Rc_E5wjTX!8nfM85|GBk8u;@=UBj3*oG^} zuWG+Ib~5oBbzvxK=3xRWm_f}y!6vNX1VO&U8sk4ip#UCoaMz*kuVFhbVgf(mDO|#4 z?BHRiS>O6N(FJ83!#lVI7x6rPK|MIlT{4fmaRe8z7|cicQx#}KWtzt81UiX38NcVx zi}({S;~0xJv%Wp!grMvNsx+_h9KORO##>yetQUtFXHeHo2J=PS#dsQ(@eFq1JU+q? z*or537>~3IxJqCptgbO}h^J{UQ=2ye$zV6*JZfu>qDnf2SMeH>lr5t&`hiMd9~V{d z2=?I{EaF$x!h=Mo`wrkS9B-%opE-HJgi1HjvEdY+Wn4l6bvN^RxU9hXb)e}T-R{oJ zvdB8F6HSWkZmM+n+t_gnN2vbzTGiHEMQpsrs+ zJxGK_O&G`h>@R&Z8W^~YY0R4mPjNf_m)MRGCOMcueetZZfW7pKcn8a7e2ht&fhpvq zGK&)g`T#YMcB1HFf7wc7GakXCcok3LTjX6b7^$9U4{D}H@Gu_7W}HLK+(YccGU~jF z8P`er{t)WM{n(1bm@m*cL1P(yMD~<#_?k!q3@*@r$J_L7=Ub|Ql(CKeGt{eEL{0H` z9LEMa98#w67|tNsmsjZFdt8T^82LX%V}h`BlOT4NTOdh@U*FVl?kdA&8C*P{yKcX{;#(dyQ!O~WXQiO5c4Mr+2!(5c6zVv zOkc>I9(U~?$Jv)CUbME93RXv5eQMB74eU(qD9trC*Tnuebw1o(9F6pr7Q=0|A~AO+V$*1IX8RB^-2TLnZO@?4s9|3 diff --git a/datacenterlight/locale/de/LC_MESSAGES/django.po b/datacenterlight/locale/de/LC_MESSAGES/django.po index ca4f8e6c..28006abf 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-07 02:09+0530\n" +"POT-Creation-Date: 2017-06-11 17:42+0530\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -77,40 +77,34 @@ msgstr "Vielen Dank!" #: templates/datacenterlight/index.html:62 #: templates/datacenterlight/index.html:160 -#: templates/datacenterlight/index.html:345 -#: templates/datacenterlight/new-order.html:62 -#: templates/datacenterlight/new-order.html:203 -#: templates/datacenterlight/order.html:62 -#: templates/datacenterlight/order.html:203 +#: templates/datacenterlight/index.html:383 +#: templates/datacenterlight/order.html:24 +#: templates/datacenterlight/order.html:165 #: templates/datacenterlight/pricing.html:62 #: templates/datacenterlight/pricing.html:190 -#: templates/datacenterlight/success.html:62 +#: templates/datacenterlight/success.html:23 msgid "What is it" msgstr "Was ist es?" #: templates/datacenterlight/index.html:65 #: templates/datacenterlight/index.html:189 -#: templates/datacenterlight/index.html:348 -#: templates/datacenterlight/new-order.html:65 -#: templates/datacenterlight/new-order.html:206 -#: templates/datacenterlight/order.html:65 -#: templates/datacenterlight/order.html:206 +#: templates/datacenterlight/index.html:386 +#: templates/datacenterlight/order.html:27 +#: templates/datacenterlight/order.html:168 #: templates/datacenterlight/pricing.html:65 #: templates/datacenterlight/pricing.html:193 -#: templates/datacenterlight/success.html:65 +#: templates/datacenterlight/success.html:26 msgid "Scale out" msgstr "Skalierung" #: templates/datacenterlight/index.html:68 #: templates/datacenterlight/index.html:215 -#: templates/datacenterlight/index.html:351 -#: templates/datacenterlight/new-order.html:68 -#: templates/datacenterlight/new-order.html:209 -#: templates/datacenterlight/order.html:68 -#: templates/datacenterlight/order.html:209 +#: templates/datacenterlight/index.html:389 +#: templates/datacenterlight/order.html:30 +#: templates/datacenterlight/order.html:171 #: templates/datacenterlight/pricing.html:68 #: templates/datacenterlight/pricing.html:196 -#: templates/datacenterlight/success.html:68 +#: templates/datacenterlight/success.html:29 msgid "Reliable and light" msgstr "Zuverlässig und leicht" @@ -119,14 +113,12 @@ msgid "Order VM" msgstr "VM bestellen" #: templates/datacenterlight/index.html:74 -#: templates/datacenterlight/index.html:358 -#: templates/datacenterlight/new-order.html:74 -#: templates/datacenterlight/new-order.html:216 -#: templates/datacenterlight/order.html:74 -#: templates/datacenterlight/order.html:216 +#: templates/datacenterlight/index.html:396 +#: templates/datacenterlight/order.html:36 +#: templates/datacenterlight/order.html:178 #: templates/datacenterlight/pricing.html:74 #: templates/datacenterlight/pricing.html:203 -#: templates/datacenterlight/success.html:74 +#: templates/datacenterlight/success.html:35 msgid "Contact" msgstr "Kontakt" @@ -181,97 +173,79 @@ msgstr "" "Angebot ist aufgrund unserer leichten Infrastruktur überaus kostengünstig." #: templates/datacenterlight/index.html:236 -#: templates/datacenterlight/new-order.html:106 -#: templates/datacenterlight/order.html:106 -#: templates/datacenterlight/pricing.html:106 -msgid "We are cutting down the costs significantly!" -msgstr "Wir sorgen dafür, dass die Kosten für Sie signifikant abnehmen" +#: templates/datacenterlight/order.html:143 +#: templates/datacenterlight/pricing.html:168 +msgid "Simple and affordable: Try our virtual machine with featherlight price." +msgstr "Einfach und bezahlbar: Teste nun unsere virtuellen Maschinen mit federleichten Preisen." #: templates/datacenterlight/index.html:237 msgid "Affordable VM hosting based in Switzerland" msgstr "Bezahlbares VM Hosting in der Schweiz" -#: templates/datacenterlight/index.html:244 -#: templates/datacenterlight/new-order.html:119 -#: templates/datacenterlight/order.html:119 +#: templates/datacenterlight/index.html:248 +#: templates/datacenterlight/order.html:81 #: templates/datacenterlight/pricing.html:119 msgid "VM hosting" msgstr "VM Hosting" -#: templates/datacenterlight/index.html:251 -msgid "Based in Switzerland" -msgstr "Standort des Datacenters ist in der Schweiz" - -#: templates/datacenterlight/index.html:260 -msgid "10 GB Storage (SSD)" -msgstr "10 GB Storage (SSD)" - -#: templates/datacenterlight/index.html:263 -#: templates/datacenterlight/new-order.html:171 -#: templates/datacenterlight/order.html:171 -#: templates/datacenterlight/pricing.html:161 -msgid "Order Now!" -msgstr "Bestelle jetzt!" - -#: templates/datacenterlight/index.html:279 -msgid "I want to have it!" -msgstr "Das möchte ich haben!" - -#: templates/datacenterlight/index.html:306 -msgid "Switzerland " -msgstr "Schweiz" - -#: templates/datacenterlight/index.html:323 -msgid "Questions?" -msgstr "Fragen?" - -#: templates/datacenterlight/index.html:323 -msgid "Contact us!" -msgstr "Kontaktiere uns!" - -#: templates/datacenterlight/index.html:341 -#: templates/datacenterlight/new-order.html:199 -#: templates/datacenterlight/order.html:199 -#: templates/datacenterlight/pricing.html:186 -msgid "Home" -msgstr "Home" - -#: templates/datacenterlight/index.html:354 -#: templates/datacenterlight/new-order.html:212 -#: templates/datacenterlight/order.html:212 -#: templates/datacenterlight/pricing.html:199 -msgid "Pricing" -msgstr "Preise" - -#: templates/datacenterlight/new-order.html:71 -#: templates/datacenterlight/order.html:71 -#: templates/datacenterlight/pricing.html:71 -#: templates/datacenterlight/success.html:71 -msgid "Buy VM" -msgstr "VM Kaufen" - -#: templates/datacenterlight/new-order.html:127 -#: templates/datacenterlight/order.html:127 +#: templates/datacenterlight/index.html:256 +#: templates/datacenterlight/order.html:89 #: templates/datacenterlight/pricing.html:127 msgid "Hosted in Switzerland" msgstr "Standort des Datacenters ist in der Schweiz" -#: templates/datacenterlight/new-order.html:144 -#: templates/datacenterlight/order.html:144 +#: templates/datacenterlight/index.html:273 +#: templates/datacenterlight/order.html:106 #: templates/datacenterlight/pricing.html:144 msgid "GB Storage (SSD)" msgstr "GB Storage (SSD)" -#: templates/datacenterlight/new-order.html:181 -#: templates/datacenterlight/order.html:181 -#: templates/datacenterlight/pricing.html:168 -msgid "Simple and affordable: Try our virtual machine with featherlight price." -msgstr "" -"Einfach und bezahlbar: Testen Sie unsere virtuellen Maschinen mit " -"federleichten Preisen" +#: templates/datacenterlight/index.html:297 +#: templates/datacenterlight/order.html:133 +#: templates/datacenterlight/pricing.html:161 +msgid "Order Now!" +msgstr "Bestelle jetzt!" -#: templates/datacenterlight/new-order.html:184 -#: templates/datacenterlight/order.html:184 +#: templates/datacenterlight/index.html:317 +msgid "I want to have it!" +msgstr "Das möchte ich haben!" + +#: templates/datacenterlight/index.html:344 +msgid "Switzerland " +msgstr "Schweiz" + +#: templates/datacenterlight/index.html:361 +msgid "Questions?" +msgstr "Fragen?" + +#: templates/datacenterlight/index.html:361 +msgid "Contact us!" +msgstr "Kontaktiere uns!" + +#: templates/datacenterlight/index.html:379 +#: templates/datacenterlight/order.html:161 +#: templates/datacenterlight/pricing.html:186 +msgid "Home" +msgstr "Home" + +#: templates/datacenterlight/index.html:392 +#: templates/datacenterlight/order.html:174 +#: templates/datacenterlight/pricing.html:199 +msgid "Pricing" +msgstr "Preise" + +#: templates/datacenterlight/order.html:33 +#: templates/datacenterlight/pricing.html:71 +#: templates/datacenterlight/success.html:32 +msgid "Buy VM" +msgstr "VM Kaufen" + +#: templates/datacenterlight/order.html:68 +#: templates/datacenterlight/pricing.html:106 +msgid "We are cutting down the costs significantly!" +msgstr "Wir sorgen dafür, dass die Kosten für Sie signifikant abnehmen" + +#: templates/datacenterlight/order.html:146 #: templates/datacenterlight/pricing.html:171 msgid "" "Our VMs are hosted in Glarus, Switzerland, and our website is currently " @@ -288,16 +262,22 @@ msgstr "" "uns unter support@datacenterlight.ch. Unser Team wird sich umgehend um dein " "Anliegen kümmern!" -#: templates/datacenterlight/success.html:101 +#: templates/datacenterlight/success.html:62 msgid "Thank you for order! Our team will contact you via email" msgstr "" "Vielen Dank für die Bestellung. Unser Team setzt sich sobald wie möglich mit " "Ihnen via E-Mail in Verbindung." -#: templates/datacenterlight/success.html:103 +#: templates/datacenterlight/success.html:64 msgid "as soon as possible!" msgstr "" +#~ msgid "Based in Switzerland" +#~ msgstr "Standort des Datacenters ist in der Schweiz" + +#~ msgid "10 GB Storage (SSD)" +#~ msgstr "10 GB Storage (SSD)" + #~ msgid "Request Newsletter" #~ msgstr "Newsletter abonnieren" From c5fdb3da5a1a0509db4e23255b3408768b000c4e Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Sun, 11 Jun 2017 19:51:54 +0530 Subject: [PATCH 11/21] Updated change log --- Changelog | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Changelog b/Changelog index f3e3d4d4..8de797e4 100644 --- a/Changelog +++ b/Changelog @@ -1,3 +1,5 @@ +1.0.9: 2017-06-11 + * [datacenterlight] Moved calculator to the landing page 1.0.8: 2017-06-08 * [datacenterlight] Fixed german typos * [datacenterlight] Refactored dcl order/success templates From 943fc741bf943b631fcad66d2287849b0ec1821d Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Sun, 11 Jun 2017 20:06:54 +0530 Subject: [PATCH 12/21] Modified the IndexView to send text email on receiving new order --- datacenterlight/views.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/datacenterlight/views.py b/datacenterlight/views.py index db89a069..f0ef1852 100644 --- a/datacenterlight/views.py +++ b/datacenterlight/views.py @@ -280,7 +280,6 @@ class IndexView(CreateView): return HttpResponseRedirect(reverse('datacenterlight:order')) context = { - 'base_url': "{0}://{1}".format(self.request.scheme, self.request.get_host()), 'name': name, 'email': email, 'cores': cores, @@ -290,14 +289,13 @@ class IndexView(CreateView): 'template': template_data['name'], } email_data = { - 'subject': 'New Order Received', - 'to': 'info@ungleich.ch', - 'context': context, - 'template_name': 'new_order_notification', - 'template_path': 'datacenterlight/emails/' + 'subject': "Data Center Light Order from %s" % context['email'], + 'to': ['info@ungleich.ch'], + 'body': "\n".join(["%s=%s" % (k, v) for (k, v) in context.items()]), + 'reply_to': [context['email']], } - email = BaseEmail(**email_data) - email.send() + email = EmailMessage(**email_data) + email.send() return HttpResponseRedirect(reverse('datacenterlight:order_success')) From 792280f112a0b6817c7624702a97831ba7ecff4e Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Sun, 11 Jun 2017 20:12:46 +0530 Subject: [PATCH 13/21] Updated changelog --- Changelog | 1 + 1 file changed, 1 insertion(+) diff --git a/Changelog b/Changelog index 8de797e4..39f28a3a 100644 --- a/Changelog +++ b/Changelog @@ -1,5 +1,6 @@ 1.0.9: 2017-06-11 * [datacenterlight] Moved calculator to the landing page + * [datacenterlight] Send plain text email only for new orders 1.0.8: 2017-06-08 * [datacenterlight] Fixed german typos * [datacenterlight] Refactored dcl order/success templates From 98b9e2ee92106db4c8b7ea2c248fddd4cfd25b66 Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Sun, 11 Jun 2017 20:19:49 +0530 Subject: [PATCH 14/21] Updated Changelog --- Changelog | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Changelog b/Changelog index 39f28a3a..d18c00b6 100644 --- a/Changelog +++ b/Changelog @@ -1,6 +1,7 @@ +1.0.10: 2017-06-11 + * [datacenterlight] Send plain text email only for new orders 1.0.9: 2017-06-11 * [datacenterlight] Moved calculator to the landing page - * [datacenterlight] Send plain text email only for new orders 1.0.8: 2017-06-08 * [datacenterlight] Fixed german typos * [datacenterlight] Refactored dcl order/success templates From f2aa5377d8171f3f77bd4afa5685e1a7cce87aba Mon Sep 17 00:00:00 2001 From: Sanghee Kim Date: Sun, 11 Jun 2017 23:32:37 +0200 Subject: [PATCH 15/21] month added to landing calculator box --- datacenterlight/locale/de/LC_MESSAGES/django.po | 10 ++++++++-- datacenterlight/templates/datacenterlight/index.html | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/datacenterlight/locale/de/LC_MESSAGES/django.po b/datacenterlight/locale/de/LC_MESSAGES/django.po index 28006abf..d658eda9 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-11 17:42+0530\n" +"POT-Creation-Date: 2017-06-11 23:23+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -176,7 +176,9 @@ msgstr "" #: templates/datacenterlight/order.html:143 #: templates/datacenterlight/pricing.html:168 msgid "Simple and affordable: Try our virtual machine with featherlight price." -msgstr "Einfach und bezahlbar: Teste nun unsere virtuellen Maschinen mit federleichten Preisen." +msgstr "" +"Einfach und bezahlbar: Teste nun unsere virtuellen Maschinen mit " +"federleichten Preisen." #: templates/datacenterlight/index.html:237 msgid "Affordable VM hosting based in Switzerland" @@ -188,6 +190,10 @@ msgstr "Bezahlbares VM Hosting in der Schweiz" msgid "VM hosting" msgstr "VM Hosting" +#: templates/datacenterlight/index.html:252 +msgid "month" +msgstr "Monat" + #: templates/datacenterlight/index.html:256 #: templates/datacenterlight/order.html:89 #: templates/datacenterlight/pricing.html:127 diff --git a/datacenterlight/templates/datacenterlight/index.html b/datacenterlight/templates/datacenterlight/index.html index 4c47fd8f..74c98913 100755 --- a/datacenterlight/templates/datacenterlight/index.html +++ b/datacenterlight/templates/datacenterlight/index.html @@ -249,7 +249,7 @@
15 - CHF + CHF/{% trans "month" %}
From a60e799e08859ad41d4655bc6fc34cc3c192ac8a Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Tue, 13 Jun 2017 03:14:03 +0530 Subject: [PATCH 16/21] Updated changelog --- Changelog | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Changelog b/Changelog index d18c00b6..93320353 100644 --- a/Changelog +++ b/Changelog @@ -1,3 +1,6 @@ +1.0.11: 2017-06-12 + * [datacenterlight] month added to landing calculator box + * [datacenterlight] dcl_email from address fixed to come from support@dcl 1.0.10: 2017-06-11 * [datacenterlight] Send plain text email only for new orders 1.0.9: 2017-06-11 From 83802a0a525988ff7f3e48b0ed2c6e2bf77e256d Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Tue, 13 Jun 2017 04:39:30 +0530 Subject: [PATCH 17/21] Added from_address to EmailMessage --- datacenterlight/views.py | 1 + 1 file changed, 1 insertion(+) diff --git a/datacenterlight/views.py b/datacenterlight/views.py index 920b34f7..81a38241 100644 --- a/datacenterlight/views.py +++ b/datacenterlight/views.py @@ -295,6 +295,7 @@ class IndexView(CreateView): } email_data = { 'subject': "Data Center Light Order from %s" % context['email'], + 'from_address': '(datacenterlight) datacenterlight Support ', 'to': ['info@ungleich.ch'], 'body': "\n".join(["%s=%s" % (k, v) for (k, v) in context.items()]), 'reply_to': [context['email']], From 1a7615dc9a426c9a267060bcbe56cfa4a3e2e276 Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Tue, 13 Jun 2017 05:03:46 +0530 Subject: [PATCH 18/21] Fixed a typo --- datacenterlight/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datacenterlight/views.py b/datacenterlight/views.py index 81a38241..cf3405e4 100644 --- a/datacenterlight/views.py +++ b/datacenterlight/views.py @@ -295,7 +295,7 @@ class IndexView(CreateView): } email_data = { 'subject': "Data Center Light Order from %s" % context['email'], - 'from_address': '(datacenterlight) datacenterlight Support ', + 'from_email': '(datacenterlight) datacenterlight Support ', 'to': ['info@ungleich.ch'], 'body': "\n".join(["%s=%s" % (k, v) for (k, v) in context.items()]), 'reply_to': [context['email']], From 9354cad6265b6aed9968803177a919960f05e73c Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Tue, 13 Jun 2017 05:09:01 +0530 Subject: [PATCH 19/21] Updated Changelog --- Changelog | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Changelog b/Changelog index 93320353..8c36005b 100644 --- a/Changelog +++ b/Changelog @@ -1,3 +1,5 @@ +1.0.12: 2017-06-13 + * [datacenterlight] Added from address for EmailMessage 1.0.11: 2017-06-12 * [datacenterlight] month added to landing calculator box * [datacenterlight] dcl_email from address fixed to come from support@dcl From 1a37ce28178011fbdae85551cdab83e44006dd3f Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Tue, 13 Jun 2017 05:10:12 +0530 Subject: [PATCH 20/21] Updated Changelog --- Changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Changelog b/Changelog index 8c36005b..199ce724 100644 --- a/Changelog +++ b/Changelog @@ -1,5 +1,5 @@ 1.0.12: 2017-06-13 - * [datacenterlight] Added from address for EmailMessage + * [datacenterlight] Added from address for EmailMessage that was missing 1.0.11: 2017-06-12 * [datacenterlight] month added to landing calculator box * [datacenterlight] dcl_email from address fixed to come from support@dcl From 89dedab8ba86fdc7b4845dde05fb48a31afa25ea Mon Sep 17 00:00:00 2001 From: Levi Date: Tue, 13 Jun 2017 01:12:51 -0500 Subject: [PATCH 21/21] resolved henry latest conflicts --- .../datacenterlight/css/landing-page.css | 20 +------------------ 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/datacenterlight/static/datacenterlight/css/landing-page.css b/datacenterlight/static/datacenterlight/css/landing-page.css index c6b734d1..3e0e6121 100755 --- a/datacenterlight/static/datacenterlight/css/landing-page.css +++ b/datacenterlight/static/datacenterlight/css/landing-page.css @@ -595,16 +595,9 @@ h6 { width: 50%; } .price-calc-section .text .section-heading{ -<<<<<<< HEAD - font-family: 'Lato-Black'; font-size: 48px; line-height: 48px; -======= - font-family: 'Montserrat-Bold'; - font-size: 50px; - line-height: 50px; ->>>>>>> master - padding-bottom: 25px; + padding-bottom: 27px; color: #3a3a3a; letter-spacing: 1px; position: relative; @@ -671,11 +664,7 @@ h6 { } .price-calc-section .card .description span { -<<<<<<< HEAD - font-size: 18px; -======= font-size: 16px; ->>>>>>> master margin-left: 4px; margin-left: 0px; /* justify-self: start; */ @@ -728,11 +717,7 @@ h6 { .price-calc-section .card .description.input label{ font-size: 15px; font-weight: 800; -<<<<<<< HEAD font-family: 'Lato-Regular'; -======= - font-family: 'Montserrat-Regular'; ->>>>>>> master margin-bottom: 0; width: 40px; } @@ -746,10 +731,7 @@ h6 { background: #fff; margin-left: 10px; } -<<<<<<< HEAD -======= ->>>>>>> master .price-calc-section .card .check-ip input[type=checkbox]{ font-size: 17px; margin: 0 8px;