Fix conflicts

This commit is contained in:
Henry Bravo 2017-06-13 10:36:39 -05:00
commit a03f2f8f89
7 changed files with 259 additions and 292 deletions

View file

@ -1,3 +1,12 @@
1.0.12: 2017-06-13
* [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
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
1.0.8: 2017-06-08 1.0.8: 2017-06-08
* [datacenterlight] Fixed german typos * [datacenterlight] Fixed german typos
* [datacenterlight] Refactored dcl order/success templates * [datacenterlight] Refactored dcl order/success templates

View file

@ -8,6 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
<<<<<<< HEAD
"POT-Creation-Date: 2017-06-09 16:08-0500\n" "POT-Creation-Date: 2017-06-09 16:08-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
@ -75,7 +76,58 @@ msgstr ""
msgid "Thank you!" msgid "Thank you!"
msgstr "Vielen Dank!" msgstr "Vielen Dank!"
<<<<<<< HEAD
#: templates/datacenterlight/home.html:15 #: templates/datacenterlight/home.html:15
=======
#: templates/datacenterlight/index.html:62
#: templates/datacenterlight/index.html:160
#: 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:23
msgid "What is it"
msgstr "Was ist es?"
#: templates/datacenterlight/index.html:65
#: templates/datacenterlight/index.html:189
#: 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:26
msgid "Scale out"
msgstr "Skalierung"
#: templates/datacenterlight/index.html:68
#: templates/datacenterlight/index.html:215
#: 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:29
msgid "Reliable and light"
msgstr "Zuverlässig und leicht"
#: templates/datacenterlight/index.html:71
msgid "Order VM"
msgstr "VM bestellen"
#: templates/datacenterlight/index.html:74
#: 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:35
msgid "Contact"
msgstr "Kontakt"
#: templates/datacenterlight/index.html:127
>>>>>>> 05883952264ad1b5650deaf05bb92cc3937c62fa
msgid "Finally, an affordable VM hosting in Switzerland!" msgid "Finally, an affordable VM hosting in Switzerland!"
msgstr "Endlich: bezahlbares VM Hosting in der Schweiz" msgstr "Endlich: bezahlbares VM Hosting in der Schweiz"
@ -160,16 +212,27 @@ msgstr ""
"Energieversorgung sowie schneller Internetverbindung ausgestattet. Unser " "Energieversorgung sowie schneller Internetverbindung ausgestattet. Unser "
"Angebot ist aufgrund unserer leichten Infrastruktur überaus kostengünstig." "Angebot ist aufgrund unserer leichten Infrastruktur überaus kostengünstig."
<<<<<<< HEAD
#: templates/datacenterlight/home.html:136 #: templates/datacenterlight/home.html:136
#: templates/datacenterlight/order.html:9 #: templates/datacenterlight/order.html:9
#: templates/datacenterlight/pricing.html:9 #: templates/datacenterlight/pricing.html:9
msgid "We are cutting down the costs significantly!" msgid "We are cutting down the costs significantly!"
msgstr "Wir sorgen dafür, dass die Kosten für Sie signifikant abnehmen" msgstr "Wir sorgen dafür, dass die Kosten für Sie signifikant abnehmen"
=======
#: templates/datacenterlight/index.html:236
#: 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."
>>>>>>> 05883952264ad1b5650deaf05bb92cc3937c62fa
#: templates/datacenterlight/home.html:137 #: templates/datacenterlight/home.html:137
msgid "Affordable VM hosting based in Switzerland" msgid "Affordable VM hosting based in Switzerland"
msgstr "Bezahlbares VM Hosting in der Schweiz" msgstr "Bezahlbares VM Hosting in der Schweiz"
<<<<<<< HEAD
#: templates/datacenterlight/home.html:144 #: templates/datacenterlight/home.html:144
#: templates/datacenterlight/order.html:22 #: templates/datacenterlight/order.html:22
#: templates/datacenterlight/pricing.html:22 #: templates/datacenterlight/pricing.html:22
@ -238,6 +301,88 @@ msgstr ""
#: templates/datacenterlight/order.html:87 #: templates/datacenterlight/order.html:87
#: templates/datacenterlight/pricing.html:86 #: templates/datacenterlight/pricing.html:86
=======
#: 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:252
msgid "month"
msgstr "Monat"
#: 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/index.html:273
#: templates/datacenterlight/order.html:106
#: templates/datacenterlight/pricing.html:144
msgid "GB Storage (SSD)"
msgstr "GB Storage (SSD)"
#: templates/datacenterlight/index.html:297
#: templates/datacenterlight/order.html:133
#: templates/datacenterlight/pricing.html:161
msgid "Order Now!"
msgstr "Bestelle jetzt!"
#: templates/datacenterlight/index.html:302
msgid "Want to know more? Subscribe to our newsletter!"
msgstr "Willst du mehr wissen? Abonniere unseren Newsletter!"
#: templates/datacenterlight/index.html:364
#: templates/datacenterlight/index.html:279
#: 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:377
#: templates/datacenterlight/index.html:354
#: templates/datacenterlight/new-order.html:212
#: templates/datacenterlight/order.html:212
#: 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
>>>>>>> 05883952264ad1b5650deaf05bb92cc3937c62fa
msgid "" msgid ""
"Our VMs are hosted in Glarus, Switzerland, and our website is currently " "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 " "running in BETA mode. If you want more information that you did not find on "
@ -253,12 +398,17 @@ msgstr ""
"uns unter support@datacenterlight.ch. Unser Team wird sich umgehend um dein " "uns unter support@datacenterlight.ch. Unser Team wird sich umgehend um dein "
"Anliegen kümmern!" "Anliegen kümmern!"
<<<<<<< HEAD
#: templates/datacenterlight/success.html:8 #: templates/datacenterlight/success.html:8
=======
#: templates/datacenterlight/success.html:62
>>>>>>> 05883952264ad1b5650deaf05bb92cc3937c62fa
msgid "Thank you for order! Our team will contact you via email" msgid "Thank you for order! Our team will contact you via email"
msgstr "" msgstr ""
"Vielen Dank für die Bestellung. Unser Team setzt sich sobald wie möglich mit " "Vielen Dank für die Bestellung. Unser Team setzt sich sobald wie möglich mit "
"Ihnen via E-Mail in Verbindung." "Ihnen via E-Mail in Verbindung."
<<<<<<< HEAD
#: templates/datacenterlight/success.html:10 #: templates/datacenterlight/success.html:10
msgid "as soon as possible!" msgid "as soon as possible!"
msgstr "" msgstr ""
@ -291,6 +441,17 @@ msgstr ""
#~ msgid "Buy VM" #~ msgid "Buy VM"
#~ msgstr "VM Kaufen" #~ msgstr "VM Kaufen"
=======
#: 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)"
>>>>>>> 05883952264ad1b5650deaf05bb92cc3937c62fa
#~ msgid "Request Newsletter" #~ msgid "Request Newsletter"
#~ msgstr "Newsletter abonnieren" #~ msgstr "Newsletter abonnieren"

View file

@ -618,6 +618,12 @@ h6 {
max-width: 400px; max-width: 400px;
position: relative; position: relative;
} }
.price-calc-section .landing {
width: 100% !important;
}
.no-padding{
padding:0 !important;
}
.price-calc-section .card .img-beta{ .price-calc-section .card .img-beta{
position: absolute; position: absolute;
top: 5px; top: 5px;

View file

@ -1,137 +0,0 @@
{% load static from staticfiles %}
<!-- Inliner Build Version 4380b7741bb759d6cb997545f3add21ad48f010b -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Oxygen Invoice</title>
</head>
<body bgcolor="#ffffff" style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; width: 100% !important; height: 100%; color: white; margin: 0;">
<style type="text/css">
@media only screen and (max-width: 480px) {
table[class*="container-for-gmail-android"] {
min-width: 290px !important; width: 100% !important;
}
img[class="force-width-gmail"] {
display: none !important; width: 0 !important; height: 0 !important;
}
table[class="w320"] {
width: 320px !important;
}
td[class*="mobile-header-padding-left"] {
width: 160px !important; padding-left: 0 !important;
}
td[class*="mobile-header-padding-right"] {
width: 160px !important; padding-right: 0 !important;
}
td[class="header-lg"] {
font-size: 24px !important; padding-bottom: 5px !important;
}
td[class="content-padding"] {
padding: 5px 0 5px !important;
}
td[class="button"] {
padding: 5px 5px 30px !important;
}
td[class*="free-text"] {
padding: 10px 18px 30px !important;
}
td[class~="mobile-hide-img"] {
display: none !important; height: 0 !important; width: 0 !important; line-height: 0 !important;
}
td[class~="item"] {
width: 140px !important; vertical-align: top !important;
}
td[class~="quantity"] {
width: 50px !important;
}
td[class~="price"] {
width: 90px !important;
}
td[class="item-table"] {
padding: 30px 20px !important;
}
td[class="mini-container-left"] {
padding: 0 15px 15px !important; display: block !important; width: 290px !important;
}
td[class="mini-container-right"] {
padding: 0 15px 15px !important; display: block !important; width: 290px !important;
}
}
</style>
<table align="center" cellpadding="0" cellspacing="0" class="container-for-gmail-android" width="100%" style="border-collapse: collapse !important; min-width: 600px; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;">
<tr style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;">
<td align="left" valign="top" width="100%" style="border-collapse: collapse; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; font-size: 14px; color: #777777; text-align: center; line-height: 21px; background: #ffffff url(http://s3.amazonaws.com/swu-filepicker/4E687TRe69Ld95IDWyEg_bg_top_02.jpg) repeat-x;" bgcolor="#ffffff">
<center style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;">
<table cellspacing="0" cellpadding="0" width="100%" bgcolor="#ffffff" background="http://s3.amazonaws.com/swu-filepicker/4E687TRe69Ld95IDWyEg_bg_top_02.jpg" style="border-collapse: collapse !important; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; background: transparent;"><tr style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;">
<td width="100%" height="80" valign="top" style="text-align: center; vertical-align: middle; border-collapse: collapse; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; font-size: 14px; color: #777777; line-height: 21px; background-color: #ffffff" align="center">
<!--[if gte mso 9]>
<v:rect xmlns:v="urn:schemas-microsoft-com:vml" fill="true" stroke="false" style="mso-width-percent:1000;height:80px; v-text-anchor:middle;">
<v:fill type="tile" src="http://s3.amazonaws.com/swu-filepicker/4E687TRe69Ld95IDWyEg_bg_top_02.jpg" color="#ffffff" />
<v:textbox inset="0,0,0,0">
<![endif]-->
<center style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;">
<table cellpadding="0" cellspacing="0" width="600" class="w320" style="border-collapse: collapse !important; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"><tr style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;">
<td class="pull-left mobile-header-padding-left" style="vertical-align: middle; border-collapse: collapse; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; font-size: 14px; color: #777777; text-align: left; line-height: 21px; width: 290px; padding-left: 10px;" align="left" valign="middle">
<a href="{{base_url}}" style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; color: #676767; text-decoration: none !important;"><img width="137" src="{{base_url}}{% static 'datacenterlight/img/datacenterlight.png' %}" alt="logo" style="max-width: 600px; outline: none; text-decoration: none; -ms-interpolation-mode: bicubic; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; border: none;"></a>
</td>
<td class="pull-right mobile-header-padding-right" style="color: #4d4d4d; border-collapse: collapse; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; font-size: 14px; text-align: right; line-height: 21px; width: 290px; padding-left: 10px;" align="right">
</td>
</tr></table>
</center>
<!--[if gte mso 9]>
</v:textbox>
</v:rect>
<![endif]-->
</td>
</tr></table>
</center>
</td>
</tr>
<tr style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;">
<td align="center" valign="top" width="100%" style="border-collapse: collapse; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; font-size: 14px; color: #777777; text-align: center; line-height: 21px; background: #ffffff; padding: 20px 0 5px;" class="content-padding" bgcolor="#f7f7f7">
<center style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;">
<table cellspacing="0" cellpadding="0" width="600" class="w320" style="border-collapse: collapse !important; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;">
<tr style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;">
<td class="header-lg" style="border-collapse: collapse; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; font-size: 32px; color: #4d4d4d; text-align: left; line-height: normal; font-weight: 400; padding: 35px 5 0;" align="center">
We have received a new order.
</td>
</tr>
<tr style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;">
<td class="free-text" style="border-collapse: collapse; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; font-size: 14px; color: #777777; text-align: left; line-height: 21px; width: 100% !important; padding: 40px 7px 20px;" align="center">
<p>
<h4>User details</h4>
Name: {{name}} <br/>
Email: {{email}} <br/>
<h4>VM details</h4>
Cores: {{cores}} <br/>
Memory: {{memory}} <br/>
Storage: {{storage}} <br/>
Price: {{price}} <br/>
Template: {{template}} <br/>
</p></td>
</tr>
<tr style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;">
<td class="button" style="border-collapse: collapse; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; font-size: 14px; color: #777777; text-align: center; line-height: 21px; padding: 0;" align="center">&nbsp;</td>
</tr>
</table>
</center>
</td>
</tr>
<tr style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;">
<td align="center" valign="top" width="100%" style="height: 100px; border-collapse: collapse; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; font-size: 14px; color: #777777; text-align: center; line-height: 21px; background: #ffffff;" bgcolor="#ffffff">
<center style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;">
<table cellspacing="0" cellpadding="0" width="600" class="w320" style="border-collapse: collapse !important; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"><tr style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;">
<td style="border-collapse: collapse; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; font-size: 14px; font-weight: 600; color: #7293de; padding: 25px 9px 0px;text-align: left; line-height: 21px;;" align="left">Your data center light team<br style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;">
</td>
</tr></table>
</center>
</td>
</tr>
</table>
</body>
</html>

View file

@ -1,137 +0,0 @@
{% load static from staticfiles %}
<!-- Inliner Build Version 4380b7741bb759d6cb997545f3add21ad48f010b -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Oxygen Invoice</title>
</head>
<body bgcolor="#ffffff" style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; width: 100% !important; height: 100%; color: white; margin: 0;">
<style type="text/css">
@media only screen and (max-width: 480px) {
table[class*="container-for-gmail-android"] {
min-width: 290px !important; width: 100% !important;
}
img[class="force-width-gmail"] {
display: none !important; width: 0 !important; height: 0 !important;
}
table[class="w320"] {
width: 320px !important;
}
td[class*="mobile-header-padding-left"] {
width: 160px !important; padding-left: 0 !important;
}
td[class*="mobile-header-padding-right"] {
width: 160px !important; padding-right: 0 !important;
}
td[class="header-lg"] {
font-size: 24px !important; padding-bottom: 5px !important;
}
td[class="content-padding"] {
padding: 5px 0 5px !important;
}
td[class="button"] {
padding: 5px 5px 30px !important;
}
td[class*="free-text"] {
padding: 10px 18px 30px !important;
}
td[class~="mobile-hide-img"] {
display: none !important; height: 0 !important; width: 0 !important; line-height: 0 !important;
}
td[class~="item"] {
width: 140px !important; vertical-align: top !important;
}
td[class~="quantity"] {
width: 50px !important;
}
td[class~="price"] {
width: 90px !important;
}
td[class="item-table"] {
padding: 30px 20px !important;
}
td[class="mini-container-left"] {
padding: 0 15px 15px !important; display: block !important; width: 290px !important;
}
td[class="mini-container-right"] {
padding: 0 15px 15px !important; display: block !important; width: 290px !important;
}
}
</style>
<table align="center" cellpadding="0" cellspacing="0" class="container-for-gmail-android" width="100%" style="border-collapse: collapse !important; min-width: 600px; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;">
<tr style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;">
<td align="left" valign="top" width="100%" style="border-collapse: collapse; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; font-size: 14px; color: #777777; text-align: center; line-height: 21px; background: #ffffff url(http://s3.amazonaws.com/swu-filepicker/4E687TRe69Ld95IDWyEg_bg_top_02.jpg) repeat-x;" bgcolor="#ffffff">
<center style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;">
<table cellspacing="0" cellpadding="0" width="100%" bgcolor="#ffffff" background="http://s3.amazonaws.com/swu-filepicker/4E687TRe69Ld95IDWyEg_bg_top_02.jpg" style="border-collapse: collapse !important; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; background: transparent;"><tr style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;">
<td width="100%" height="80" valign="top" style="text-align: center; vertical-align: middle; border-collapse: collapse; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; font-size: 14px; color: #777777; line-height: 21px; background-color: #ffffff" align="center">
<!--[if gte mso 9]>
<v:rect xmlns:v="urn:schemas-microsoft-com:vml" fill="true" stroke="false" style="mso-width-percent:1000;height:80px; v-text-anchor:middle;">
<v:fill type="tile" src="http://s3.amazonaws.com/swu-filepicker/4E687TRe69Ld95IDWyEg_bg_top_02.jpg" color="#ffffff" />
<v:textbox inset="0,0,0,0">
<![endif]-->
<center style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;">
<table cellpadding="0" cellspacing="0" width="600" class="w320" style="border-collapse: collapse !important; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"><tr style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;">
<td class="pull-left mobile-header-padding-left" style="vertical-align: middle; border-collapse: collapse; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; font-size: 14px; color: #777777; text-align: left; line-height: 21px; width: 290px; padding-left: 10px;" align="left" valign="middle">
<a href="{{base_url}}" style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; color: #676767; text-decoration: none !important;"><img width="137" src="{{base_url}}{% static 'datacenterlight/img/datacenterlight.png' %}" alt="logo" style="max-width: 600px; outline: none; text-decoration: none; -ms-interpolation-mode: bicubic; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; border: none;"></a>
</td>
<td class="pull-right mobile-header-padding-right" style="color: #4d4d4d; border-collapse: collapse; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; font-size: 14px; text-align: right; line-height: 21px; width: 290px; padding-left: 10px;" align="right">
</td>
</tr></table>
</center>
<!--[if gte mso 9]>
</v:textbox>
</v:rect>
<![endif]-->
</td>
</tr></table>
</center>
</td>
</tr>
<tr style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;">
<td align="center" valign="top" width="100%" style="border-collapse: collapse; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; font-size: 14px; color: #777777; text-align: center; line-height: 21px; background: #ffffff; padding: 20px 0 5px;" class="content-padding" bgcolor="#f7f7f7">
<center style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;">
<table cellspacing="0" cellpadding="0" width="600" class="w320" style="border-collapse: collapse !important; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;">
<tr style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;">
<td class="header-lg" style="border-collapse: collapse; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; font-size: 32px; color: #4d4d4d; text-align: left; line-height: normal; font-weight: 400; padding: 35px 5 0;" align="center">
We have received a new order.
</td>
</tr>
<tr style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;">
<td class="free-text" style="border-collapse: collapse; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; font-size: 14px; color: #777777; text-align: left; line-height: 21px; width: 100% !important; padding: 40px 7px 20px;" align="center">
<p>
<h4>User details</h4>
Name: {{name}} <br/>
Email: {{email}} <br/>
<h4>VM details</h4>
Cores: {{cores}} <br/>
Memory: {{memory}} <br/>
Storage: {{storage}} <br/>
Price: {{price}} <br/>
Template: {{template}} <br/>
</p></td>
</tr>
<tr style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;">
<td class="button" style="border-collapse: collapse; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; font-size: 14px; color: #777777; text-align: center; line-height: 21px; padding: 0;" align="center">&nbsp;</td>
</tr>
</table>
</center>
</td>
</tr>
<tr style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;">
<td align="center" valign="top" width="100%" style="height: 100px; border-collapse: collapse; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; font-size: 14px; color: #777777; text-align: center; line-height: 21px; background: #ffffff;" bgcolor="#ffffff">
<center style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;">
<table cellspacing="0" cellpadding="0" width="600" class="w320" style="border-collapse: collapse !important; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;"><tr style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;">
<td style="border-collapse: collapse; font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important; font-size: 14px; font-weight: 600; color: #7293de; padding: 25px 9px 0px;text-align: left; line-height: 21px;;" align="left">Your data center light team<br style="font-family: 'Raleway', 'Helvetica Neue', 'Arial', 'sans-serif' !important;">
</td>
</tr></table>
</center>
</td>
</tr>
</table>
</body>
</html>

View file

@ -4,6 +4,7 @@ from .forms import BetaAccessForm
from .models import BetaAccess, BetaAccessVMType, BetaAccessVM from .models import BetaAccess, BetaAccessVMType, BetaAccessVM
from django.contrib import messages from django.contrib import messages
from django.core.urlresolvers import reverse_lazy, reverse from django.core.urlresolvers import reverse_lazy, reverse
from django.core.mail import EmailMessage
from utils.mailer import BaseEmail from utils.mailer import BaseEmail
from django.shortcuts import render from django.shortcuts import render
from django.shortcuts import redirect from django.shortcuts import redirect
@ -59,7 +60,7 @@ class PricingView(TemplateView):
if not request.user.is_authenticated(): if not request.user.is_authenticated():
request.session['next'] = reverse('hosting:payment') request.session['next'] = reverse('hosting:payment')
request.session['specs'] = { request.session['specs'] = {
'cpu':cores, 'cpu':cores,
'memory': memory, 'memory': memory,
'disk_size': storage, 'disk_size': storage,
@ -101,7 +102,7 @@ class OrderView(TemplateView):
manager = OpenNebulaManager() manager = OpenNebulaManager()
template = manager.get_template(template_id) template = manager.get_template(template_id)
template_data = VirtualMachineTemplateSerializer(template).data template_data = VirtualMachineTemplateSerializer(template).data
name = request.POST.get('name') name = request.POST.get('name')
email = request.POST.get('email') email = request.POST.get('email')
name_field = forms.CharField() 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)) messages.add_message(self.request, messages.ERROR, '%(value) is not a proper name.'.format(name))
return HttpResponseRedirect(reverse('datacenterlight:order')) return HttpResponseRedirect(reverse('datacenterlight:order'))
try: try:
email = email_field.clean(email) email = email_field.clean(email)
except ValidationError as err: except ValidationError as err:
messages.add_message(self.request, messages.ERROR, '%(value) is not a proper email.'.format(email)) messages.add_message(self.request, messages.ERROR, '%(value) is not a proper email.'.format(email))
return HttpResponseRedirect(reverse('datacenterlight:order')) return HttpResponseRedirect(reverse('datacenterlight:order'))
# We have valid email and name of the customer, hence send an
# email to the admin
context = { context = {
'base_url': "{0}://{1}".format(self.request.scheme, self.request.get_host()),
'name': name, 'name': name,
'email': email, 'email': email,
'cores': cores, 'cores': cores,
@ -132,13 +129,14 @@ class OrderView(TemplateView):
'template': template_data['name'], 'template': template_data['name'],
} }
email_data = { email_data = {
'subject': 'New Order Received', 'subject': "Data Center Light Order from %s" % context['email'],
'from_address': '(datacenterlight) datacenterlight Support <support@datacenterlight.ch>',
'to': 'info@ungleich.ch', 'to': 'info@ungleich.ch',
'context': context, 'context': context,
'template_name': 'new_order_notification', 'template_name': 'new_order_notification',
'template_path': 'datacenterlight/emails/' 'template_path': 'datacenterlight/emails/'
} }
email = BaseEmail(**email_data) email = EmailMessage(**email_data)
email.send() email.send()
return HttpResponseRedirect(reverse('datacenterlight:order_success')) return HttpResponseRedirect(reverse('datacenterlight:order_success'))
@ -157,6 +155,7 @@ class BetaAccessView(FormView):
email_data = { email_data = {
'subject': 'DatacenterLight Beta Access Request', 'subject': 'DatacenterLight Beta Access Request',
'from_address': '(datacenterlight) datacenterlight Support <support@datacenterlight.ch>',
'to': form.cleaned_data.get('email'), 'to': form.cleaned_data.get('email'),
'from': '(datacenterlight) DatacenterLight Support support@datacenterlight.ch', 'from': '(datacenterlight) DatacenterLight Support support@datacenterlight.ch',
'context': context, 'context': context,
@ -172,8 +171,8 @@ class BetaAccessView(FormView):
email_data = { email_data = {
'subject': 'DatacenterLight Beta Access Request', 'subject': 'DatacenterLight Beta Access Request',
'to': 'support@datacenterlight.ch', 'from_address': '(datacenterlight) datacenterlight Support <support@datacenterlight.ch>',
'from': '(datacenterlight) DatacenterLight Support support@datacenterlight.ch', 'to': 'info@ungleich.ch',
'context': context, 'context': context,
'template_name': 'request_access_notification', 'template_name': 'request_access_notification',
'template_path': 'datacenterlight/emails/' 'template_path': 'datacenterlight/emails/'
@ -223,6 +222,7 @@ class BetaProgramView(CreateView):
email_data = { email_data = {
'subject': 'DatacenterLight Beta Access Request', 'subject': 'DatacenterLight Beta Access Request',
'from_address': '(datacenterlight) datacenterlight Support <support@datacenterlight.ch>',
'to': 'info@ungleich.ch', 'to': 'info@ungleich.ch',
'context': context, 'context': context,
'template_name': 'request_beta_access_notification', 'template_name': 'request_beta_access_notification',
@ -241,6 +241,70 @@ class IndexView(CreateView):
form_class = BetaAccessForm form_class = BetaAccessForm
success_url = "/datacenterlight#requestform" success_url = "/datacenterlight#requestform"
success_message = "Thank you, we will contact you as soon as possible" 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 = {
'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_email': '(datacenterlight) datacenterlight Support <support@datacenterlight.ch>',
'to': ['info@ungleich.ch'],
'body': "\n".join(["%s=%s" % (k, v) for (k, v) in context.items()]),
'reply_to': [context['email']],
}
email = EmailMessage(**email_data)
email.send()
return HttpResponseRedirect(reverse('datacenterlight:order_success'))
def get_success_url(self): def get_success_url(self):
success_url = reverse('datacenterlight:index') success_url = reverse('datacenterlight:index')
@ -262,6 +326,7 @@ class IndexView(CreateView):
email_data = { email_data = {
'subject': 'DatacenterLight Beta Access Request', 'subject': 'DatacenterLight Beta Access Request',
'from_address': '(datacenterlight) datacenterlight Support <support@datacenterlight.ch>',
'to': form.cleaned_data.get('email'), 'to': form.cleaned_data.get('email'),
'from': '(datacenterlight) DatacenterLight Support support@datacenterlight.ch', 'from': '(datacenterlight) DatacenterLight Support support@datacenterlight.ch',
'context': context, 'context': context,
@ -277,8 +342,8 @@ class IndexView(CreateView):
email_data = { email_data = {
'subject': 'DatacenterLight Beta Access Request', 'subject': 'DatacenterLight Beta Access Request',
'to': 'support@datacenterlight.ch', 'from_address': '(datacenterlight) datacenterlight Support <support@datacenterlight.ch>',
'from': '(datacenterlight) DatacenterLight Support support@datacenterlight.ch', 'to': 'info@ungleich.ch',
'context': context, 'context': context,
'template_name': 'request_access_notification', 'template_name': 'request_access_notification',
'template_path': 'datacenterlight/emails/' 'template_path': 'datacenterlight/emails/'

View file

@ -21,10 +21,10 @@ class BaseEmail(object):
self.email = EmailMultiAlternatives(self.subject, text_content) self.email = EmailMultiAlternatives(self.subject, text_content)
self.email.attach_alternative(html_content, "text/html") self.email.attach_alternative(html_content, "text/html")
self.email.from_email = kwargs.get( if 'from_address' in kwargs:
'from', self.email.from_email = kwargs.get('from_address')
'(ungleich) ungleich Support <info@ungleich.ch>' else:
) self.email.from_email = '(ungleich) ungleich Support <info@ungleich.ch>'
self.email.to = [kwargs.get('to', 'info@ungleich.com')] self.email.to = [kwargs.get('to', 'info@ungleich.com')]
def send(self): def send(self):