From 007fc794c38bf4d109ef146e47da8bd5b9d9d320 Mon Sep 17 00:00:00 2001 From: Andrii Marynets Date: Tue, 27 Jun 2017 23:47:30 +0300 Subject: [PATCH 01/19] Add google analytics to data center light --- datacenterlight/context_processor.py | 16 ++++++++++++++++ .../templates/datacenterlight/base.html | 3 +++ .../includes/_google_analytics.html | 15 +++++++++++++++ .../templates/datacenterlight/order_detail.html | 2 +- dynamicweb/settings/base.py | 5 +++++ 5 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 datacenterlight/context_processor.py create mode 100644 datacenterlight/templates/datacenterlight/includes/_google_analytics.html diff --git a/datacenterlight/context_processor.py b/datacenterlight/context_processor.py new file mode 100644 index 00000000..b49ea364 --- /dev/null +++ b/datacenterlight/context_processor.py @@ -0,0 +1,16 @@ +from django.conf import settings + + +def google_analytics(request): + """ + Use the variables returned in this function to + render your Google Analytics tracking code template. + """ + ga_prop_id = getattr(settings, 'GOOGLE_ANALYTICS_PROPERTY_ID', False) + ga_domain = getattr(settings, 'GOOGLE_ANALYTICS_DOMAIN', False) + if not settings.DEBUG and ga_prop_id and ga_domain: + return { + 'GOOGLE_ANALYTICS_PROPERTY_ID': ga_prop_id, + 'GOOGLE_ANALYTICS_DOMAIN': ga_domain, + } + return {} diff --git a/datacenterlight/templates/datacenterlight/base.html b/datacenterlight/templates/datacenterlight/base.html index c62d92f7..bf0e0ca0 100644 --- a/datacenterlight/templates/datacenterlight/base.html +++ b/datacenterlight/templates/datacenterlight/base.html @@ -47,6 +47,9 @@ {% include "datacenterlight/includes/_footer.html" %} + + {% include "datacenterlight/includes/_google_analytics.html" %} + diff --git a/datacenterlight/templates/datacenterlight/includes/_google_analytics.html b/datacenterlight/templates/datacenterlight/includes/_google_analytics.html new file mode 100644 index 00000000..d074dfd3 --- /dev/null +++ b/datacenterlight/templates/datacenterlight/includes/_google_analytics.html @@ -0,0 +1,15 @@ + +{% if GOOGLE_ANALYTICS_PROPERTY_ID %} + +{% else %} + +{% endif %} + \ No newline at end of file diff --git a/datacenterlight/templates/datacenterlight/order_detail.html b/datacenterlight/templates/datacenterlight/order_detail.html index cb412558..8b53df5d 100644 --- a/datacenterlight/templates/datacenterlight/order_detail.html +++ b/datacenterlight/templates/datacenterlight/order_detail.html @@ -2,7 +2,7 @@ {% load staticfiles bootstrap3 %} {% load i18n %} {% block content %} - +{% include 'datacenterlight/includes/_google_analytics.html' %}
{% if messages %}
diff --git a/dynamicweb/settings/base.py b/dynamicweb/settings/base.py index d276f022..f3a80470 100644 --- a/dynamicweb/settings/base.py +++ b/dynamicweb/settings/base.py @@ -161,6 +161,7 @@ TEMPLATES = [ "django.contrib.messages.context_processors.messages", 'sekizai.context_processors.sekizai', 'cms.context_processors.cms_settings', + 'datacenterlight.context_processor.google_analytics', ], }, }, @@ -509,3 +510,7 @@ OPENNEBULA_ENDPOINT = env('OPENNEBULA_ENDPOINT') # dcl email configurations DCL_TEXT = env('DCL_TEXT') DCL_SUPPORT_FROM_ADDRESS = env('DCL_SUPPORT_FROM_ADDRESS') + +# Settings for Google analytics +GOOGLE_ANALYTICS_PROPERTY_ID = 'UA-62285904-9' +GOOGLE_ANALYTICS_DOMAIN = 'auto' From 2ad984504c584320ac7fe83125f2024df48028a3 Mon Sep 17 00:00:00 2001 From: Andrii Marynets Date: Fri, 30 Jun 2017 01:23:35 +0300 Subject: [PATCH 02/19] Add GOOGLE_ANALYTICS_PROPERTY_IDS for dynamic set ID --- datacenterlight/templates/datacenterlight/base.html | 6 +++--- .../templates/datacenterlight/order_detail.html | 3 +-- dynamicweb/settings/base.py | 9 ++++++--- .../google_analytics.html | 6 ++---- {datacenterlight => utils}/context_processor.py | 12 ++++++------ 5 files changed, 18 insertions(+), 18 deletions(-) rename datacenterlight/templates/datacenterlight/includes/_google_analytics.html => templates/google_analytics.html (75%) rename {datacenterlight => utils}/context_processor.py (52%) diff --git a/datacenterlight/templates/datacenterlight/base.html b/datacenterlight/templates/datacenterlight/base.html index bf0e0ca0..f4f659df 100644 --- a/datacenterlight/templates/datacenterlight/base.html +++ b/datacenterlight/templates/datacenterlight/base.html @@ -33,6 +33,9 @@ + + {% include "google_analytics.html" %} + @@ -47,9 +50,6 @@ {% include "datacenterlight/includes/_footer.html" %} - - {% include "datacenterlight/includes/_google_analytics.html" %} - diff --git a/datacenterlight/templates/datacenterlight/order_detail.html b/datacenterlight/templates/datacenterlight/order_detail.html index 8b53df5d..24511463 100644 --- a/datacenterlight/templates/datacenterlight/order_detail.html +++ b/datacenterlight/templates/datacenterlight/order_detail.html @@ -1,8 +1,7 @@ {% extends "hosting/base_short.html" %} {% load staticfiles bootstrap3 %} {% load i18n %} -{% block content %} -{% include 'datacenterlight/includes/_google_analytics.html' %} +{% block content %}
{% if messages %}
diff --git a/dynamicweb/settings/base.py b/dynamicweb/settings/base.py index f3a80470..31723853 100644 --- a/dynamicweb/settings/base.py +++ b/dynamicweb/settings/base.py @@ -138,6 +138,7 @@ TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [os.path.join(PROJECT_DIR, 'cms_templates/'), + os.path.join(PROJECT_DIR, 'templates'), os.path.join(PROJECT_DIR, 'cms_templates/djangocms_blog/'), os.path.join(PROJECT_DIR, 'membership'), os.path.join(PROJECT_DIR, 'hosting/templates/'), @@ -161,7 +162,7 @@ TEMPLATES = [ "django.contrib.messages.context_processors.messages", 'sekizai.context_processors.sekizai', 'cms.context_processors.cms_settings', - 'datacenterlight.context_processor.google_analytics', + 'utils.context_processor.google_analytics', ], }, }, @@ -512,5 +513,7 @@ DCL_TEXT = env('DCL_TEXT') DCL_SUPPORT_FROM_ADDRESS = env('DCL_SUPPORT_FROM_ADDRESS') # Settings for Google analytics -GOOGLE_ANALYTICS_PROPERTY_ID = 'UA-62285904-9' -GOOGLE_ANALYTICS_DOMAIN = 'auto' +GOOGLE_ANALYTICS_PROPERTY_IDS = { + 'datacenterlight.ch': 'UA-62285904-9', + 'digitalglarus.ch': 'UA-62285904-2' +} diff --git a/datacenterlight/templates/datacenterlight/includes/_google_analytics.html b/templates/google_analytics.html similarity index 75% rename from datacenterlight/templates/datacenterlight/includes/_google_analytics.html rename to templates/google_analytics.html index d074dfd3..64dbae40 100644 --- a/datacenterlight/templates/datacenterlight/includes/_google_analytics.html +++ b/templates/google_analytics.html @@ -1,4 +1,3 @@ - {% if GOOGLE_ANALYTICS_PROPERTY_ID %} {% else %} -{% endif %} - \ No newline at end of file +{% endif %} \ No newline at end of file diff --git a/datacenterlight/context_processor.py b/utils/context_processor.py similarity index 52% rename from datacenterlight/context_processor.py rename to utils/context_processor.py index b49ea364..43c27336 100644 --- a/datacenterlight/context_processor.py +++ b/utils/context_processor.py @@ -6,11 +6,11 @@ def google_analytics(request): Use the variables returned in this function to render your Google Analytics tracking code template. """ - ga_prop_id = getattr(settings, 'GOOGLE_ANALYTICS_PROPERTY_ID', False) - ga_domain = getattr(settings, 'GOOGLE_ANALYTICS_DOMAIN', False) - if not settings.DEBUG and ga_prop_id and ga_domain: + host = request.get_host() + ga_prop_id = getattr(settings, 'GOOGLE_ANALYTICS_PROPERTY_IDS', False).get(host) + print(ga_prop_id) + if ga_prop_id: return { - 'GOOGLE_ANALYTICS_PROPERTY_ID': ga_prop_id, - 'GOOGLE_ANALYTICS_DOMAIN': ga_domain, + 'GOOGLE_ANALYTICS_PROPERTY_ID': ga_prop_id } - return {} + return {} \ No newline at end of file From ebf8b0646d7a3ca94b79307dee7406ad497a15ff Mon Sep 17 00:00:00 2001 From: Andrii Marynets Date: Fri, 30 Jun 2017 01:33:12 +0300 Subject: [PATCH 03/19] Fix not add analytics if DEBUG=True --- utils/context_processor.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/utils/context_processor.py b/utils/context_processor.py index 43c27336..740591ba 100644 --- a/utils/context_processor.py +++ b/utils/context_processor.py @@ -8,9 +8,8 @@ def google_analytics(request): """ host = request.get_host() ga_prop_id = getattr(settings, 'GOOGLE_ANALYTICS_PROPERTY_IDS', False).get(host) - print(ga_prop_id) - if ga_prop_id: + if not settings.DEBUG and ga_prop_id: return { 'GOOGLE_ANALYTICS_PROPERTY_ID': ga_prop_id } - return {} \ No newline at end of file + return {} From 9431e9846c9d88ed0ed7cd7ec9ffd370a32eae79 Mon Sep 17 00:00:00 2001 From: Andrii Marynets Date: Fri, 30 Jun 2017 08:44:39 +0300 Subject: [PATCH 04/19] Add middleware for fix "get_host() method fails when the host is behind multiple proxies" --- dynamicweb/settings/base.py | 4 +++- utils/middleware.py | 17 +++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 utils/middleware.py diff --git a/dynamicweb/settings/base.py b/dynamicweb/settings/base.py index 31723853..08ed7fe5 100644 --- a/dynamicweb/settings/base.py +++ b/dynamicweb/settings/base.py @@ -118,6 +118,7 @@ INSTALLED_APPS = ( MIDDLEWARE_CLASSES = ( 'django.contrib.sessions.middleware.SessionMiddleware', + 'utils.middleware.MultipleProxyMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', @@ -515,5 +516,6 @@ DCL_SUPPORT_FROM_ADDRESS = env('DCL_SUPPORT_FROM_ADDRESS') # Settings for Google analytics GOOGLE_ANALYTICS_PROPERTY_IDS = { 'datacenterlight.ch': 'UA-62285904-9', - 'digitalglarus.ch': 'UA-62285904-2' + 'digitalglarus.ch': 'UA-62285904-2', + '127.0.0.1:8000': 'test' } diff --git a/utils/middleware.py b/utils/middleware.py new file mode 100644 index 00000000..d37bdbfd --- /dev/null +++ b/utils/middleware.py @@ -0,0 +1,17 @@ +class MultipleProxyMiddleware(object): + FORWARDED_FOR_FIELDS = [ + 'HTTP_X_FORWARDED_FOR', + 'HTTP_X_FORWARDED_HOST', + 'HTTP_X_FORWARDED_SERVER', + ] + + def process_request(self, request): + """ + Rewrites the proxy headers so that only the most + recent proxy is used. + """ + for field in self.FORWARDED_FOR_FIELDS: + if field in request.META: + if ',' in request.META[field]: + parts = request.META[field].split(',') + request.META[field] = parts[-1].strip() \ No newline at end of file From 36877d613dd43293aa1d0d08ba395f28af388ff3 Mon Sep 17 00:00:00 2001 From: Mondi Geetha Date: Sat, 1 Jul 2017 17:58:42 +0530 Subject: [PATCH 05/19] Added styles for proper positioning of error msgs --- .../datacenterlight/css/landing-page.css | 38 +++++++++++-------- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/datacenterlight/static/datacenterlight/css/landing-page.css b/datacenterlight/static/datacenterlight/css/landing-page.css index bcfa3f83..bf71eff1 100755 --- a/datacenterlight/static/datacenterlight/css/landing-page.css +++ b/datacenterlight/static/datacenterlight/css/landing-page.css @@ -430,7 +430,6 @@ h6 { } .pricing-section .card .description{ padding: 12px; - border-bottom: 1px solid rgba(128, 128, 128, 0.3); } .pricing-section .card .descriptions{ padding: 10px 30px; @@ -646,11 +645,10 @@ h6 { } .price-calc-section .card .description{ padding: 12px; - border-bottom: 1px solid rgba(128, 128, 128, 0.3); position: relative; display: flex; - justify-content: space-around; - align-items: center; + justify-content: space-around !important; + align-items: center !important; } .price-calc-section .card .description span { @@ -661,10 +659,10 @@ h6 { width: 30%; text-align: left; } -.price-calc-section .card .description input{ - font-size: 20px; - text-align: center; - width: 60px; +.price-calc-section .card .description .select-number{ + font-size: 20px; + text-align: center; + width: 60px; } .price-calc-section .card .description i{ color: #29427A; @@ -701,8 +699,8 @@ h6 { .price-calc-section .card .check-ip{ font-size: 18px; } -.price-calc-section .card .description.input{ - justify-content: center; +.price-calc-section .card .justify-center{ + justify-content: center !important; } .price-calc-section .card .description.input label{ font-size: 15px; @@ -711,10 +709,11 @@ h6 { margin-bottom: 0; width: 40px; } -.price-calc-section .card .description.input input{ - width: 200px; - font-size: 14px; - text-align: left; +/*Changed class****.price-calc-section .card .description.input input*/ +.price-calc-section .card .description input{ + width: 200px; + font-size: 14px; + text-align: left; padding: 5px 10px; border-radius: 4px; border: 1px solid #d0d0d0; @@ -726,6 +725,15 @@ h6 { font-size: 17px; margin: 0 8px; } +.help-block.with-errors { + text-align: center; + margin: 0; + padding: 0; +} +.form-group { + margin: 0; + border-bottom: 1px solid rgba(128, 128, 128, 0.3); +} @media(max-width:990px) { .pricing-section .text { @@ -911,7 +919,7 @@ h6 { text-align: center; } - .price-calc-section .card .description input { + .price-calc-section .card .description .select-number{ font-size: 17px; text-align: center; width: 60px; From afcec7eb0308dfdb9321d716210a96d237cc042e Mon Sep 17 00:00:00 2001 From: Mondi Geetha Date: Sat, 1 Jul 2017 17:59:34 +0530 Subject: [PATCH 06/19] Removed unwanted code and add bootstrap-validator cdn js --- .../templates/datacenterlight/base.html | 50 +------------------ 1 file changed, 1 insertion(+), 49 deletions(-) diff --git a/datacenterlight/templates/datacenterlight/base.html b/datacenterlight/templates/datacenterlight/base.html index c62d92f7..becb36d8 100644 --- a/datacenterlight/templates/datacenterlight/base.html +++ b/datacenterlight/templates/datacenterlight/base.html @@ -60,53 +60,5 @@ - - - - - + From e4cfcbf618d28526d9c1f4216d6a0fd77e05354a Mon Sep 17 00:00:00 2001 From: Mondi Geetha Date: Sat, 1 Jul 2017 18:01:08 +0530 Subject: [PATCH 07/19] Added some classes and divs for error msg alignment alongside the input field --- .../templates/datacenterlight/index.html | 70 +++++++++++++------ 1 file changed, 49 insertions(+), 21 deletions(-) diff --git a/datacenterlight/templates/datacenterlight/index.html b/datacenterlight/templates/datacenterlight/index.html index 6d63b29b..b05f617a 100755 --- a/datacenterlight/templates/datacenterlight/index.html +++ b/datacenterlight/templates/datacenterlight/index.html @@ -139,7 +139,7 @@
-
+ {% csrf_token %}

{% trans "VM hosting" %}

@@ -152,28 +152,37 @@
-
+

{% trans "Hosted in Switzerland" %}

-
+
+
- + Core +
+
-
+
+
- + GB RAM +
+
-
+
+
- + {% trans "GB Storage (SSD)" %} +
+
-
+
-
-
- - -
+
+
+ + +
+
+ {% for message in messages %} + {% if 'name' in message.tags %} +
  • + {{ message|safe }} +
+ {% endif %} + {% endfor %} +
+
+
+
+ + +
+
+ {% for message in messages %} + {% if 'email' in message.tags %} +
  • + {{ message|safe }} +
+ {% endif %} + {% endfor %} +
+
-
-
-
@@ -250,4 +278,4 @@
- {% endblock %} \ No newline at end of file + {% endblock %} From 0c969946f7ee6a3e8ff999d23920a3c00cd8d0cb Mon Sep 17 00:00:00 2001 From: Mondi Geetha Date: Sat, 1 Jul 2017 18:02:10 +0530 Subject: [PATCH 08/19] Added code for proper return when name/email are not good --- datacenterlight/views.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/datacenterlight/views.py b/datacenterlight/views.py index 07709981..b7c08a63 100644 --- a/datacenterlight/views.py +++ b/datacenterlight/views.py @@ -12,6 +12,7 @@ from django import forms from django.core.exceptions import ValidationError from django.views.decorators.cache import cache_control from django.conf import settings +from django.utils.translation import ugettext_lazy as _ from utils.forms import BillingAddressForm, UserBillingAddressForm from utils.models import BillingAddress from membership.models import StripeCustomer @@ -194,12 +195,9 @@ class IndexView(CreateView): @cache_control(no_cache=True, must_revalidate=True, no_store=True) def get(self, request, *args, **kwargs): - if 'specs' in request.session : - del request.session['specs'] - if 'user' in request.session : - del request.session['user'] - if 'billing_address_data' in request.session : - del request.session['billing_address_data'] + for session_var in ['specs', 'user', 'billing_address_data']: + if session_var in request.session: + del request.session[session_var] try: manager = OpenNebulaManager() templates = manager.get_templates() @@ -233,14 +231,16 @@ class IndexView(CreateView): 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:index')) + msg='{} {}.'.format(name, _('is not a proper name')) + messages.add_message(self.request, messages.ERROR, msg, extra_tags='name') + return HttpResponseRedirect(reverse('datacenterlight:index') + "#order_form") 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:index')) + msg='{} {}.'.format(email, _('is not a proper email')) + messages.add_message(self.request, messages.ERROR, msg, extra_tags='email') + return HttpResponseRedirect(reverse('datacenterlight:index') + "#order_form") specs = { 'cpu': cores, From 0a2b2c815de27157dc85b70736b54dc4de663238 Mon Sep 17 00:00:00 2001 From: Mondi Geetha Date: Sun, 2 Jul 2017 02:14:18 +0530 Subject: [PATCH 09/19] Aligned Logo, Text, Signature to left --- .../emails/request_access_confirmation.html | 8 ++++---- .../emails/request_access_notification.html | 8 ++++---- .../emails/request_beta_access_notification.html | 8 ++++---- .../templates/datacenterlight/emails/user_activation.html | 8 ++++---- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/datacenterlight/templates/datacenterlight/emails/request_access_confirmation.html b/datacenterlight/templates/datacenterlight/emails/request_access_confirmation.html index e96a8ef1..2f71944f 100644 --- a/datacenterlight/templates/datacenterlight/emails/request_access_confirmation.html +++ b/datacenterlight/templates/datacenterlight/emails/request_access_confirmation.html @@ -74,7 +74,7 @@
-
+ logo @@ -95,12 +95,12 @@
- -
+ {% trans "Thank you for your request." %}
+

{% trans "You are one step away from being our beta tester!" %}

{% trans "Currently we are running our tests to make sure everything runs perfectly." %}
{% trans "In the meantime, we would like to ask you a little patience
until our team contacts you with beta access." %}
@@ -117,7 +117,7 @@

-
Your data center light team
+
Your data center light team
diff --git a/datacenterlight/templates/datacenterlight/emails/request_access_notification.html b/datacenterlight/templates/datacenterlight/emails/request_access_notification.html index 09531ba6..095c917e 100644 --- a/datacenterlight/templates/datacenterlight/emails/request_access_notification.html +++ b/datacenterlight/templates/datacenterlight/emails/request_access_notification.html @@ -73,7 +73,7 @@
-
+ logo @@ -94,12 +94,12 @@
- - @@ -113,7 +113,7 @@
+ An user requested a beta access
+

User {{email}} requested beta access

-
Your data center light team
+
Your data center light team
diff --git a/datacenterlight/templates/datacenterlight/emails/request_beta_access_notification.html b/datacenterlight/templates/datacenterlight/emails/request_beta_access_notification.html index 7991eb69..c6f3033e 100644 --- a/datacenterlight/templates/datacenterlight/emails/request_beta_access_notification.html +++ b/datacenterlight/templates/datacenterlight/emails/request_beta_access_notification.html @@ -73,7 +73,7 @@
-
+ logo @@ -94,14 +94,14 @@
- -
+ An user requested a beta access
+

User {{email}} requested beta access

{% for vm in vms %} Type: {{vm.type}} - Amount: {{vm.amount}} @@ -119,7 +119,7 @@
-
Your data center light team
+
Your data center light team
diff --git a/datacenterlight/templates/datacenterlight/emails/user_activation.html b/datacenterlight/templates/datacenterlight/emails/user_activation.html index bf688127..e591fc54 100644 --- a/datacenterlight/templates/datacenterlight/emails/user_activation.html +++ b/datacenterlight/templates/datacenterlight/emails/user_activation.html @@ -74,7 +74,7 @@
-
+ logo @@ -95,12 +95,12 @@
- -
+ {{dcl_text}} {% trans 'account activation' %}
+

{% blocktrans %} You can activate your {{dcl_text}} account by clicking here.

@@ -120,7 +120,7 @@

-
{% trans 'Your' %} {{dcl_text}} {% trans 'team' %}
+
{% trans 'Your' %} {{dcl_text}} {% trans 'team' %}
From f48ea4714e7ba8036e46c6f7a13170c3df76e250 Mon Sep 17 00:00:00 2001 From: Mondi Geetha Date: Sun, 2 Jul 2017 18:34:17 +0530 Subject: [PATCH 10/19] changed error message color --- datacenterlight/static/datacenterlight/css/landing-page.css | 3 +++ 1 file changed, 3 insertions(+) diff --git a/datacenterlight/static/datacenterlight/css/landing-page.css b/datacenterlight/static/datacenterlight/css/landing-page.css index bf71eff1..d943a8e9 100755 --- a/datacenterlight/static/datacenterlight/css/landing-page.css +++ b/datacenterlight/static/datacenterlight/css/landing-page.css @@ -730,6 +730,9 @@ h6 { margin: 0; padding: 0; } +.has-error .checkbox, .has-error .checkbox-inline, .has-error .control-label, .has-error .help-block, .has-error .radio, .has-error .radio-inline, .has-error.checkbox label, .has-error.checkbox-inline label, .has-error.radio label, .has-error.radio-inline label{ +color: #eb4d5c; +} .form-group { margin: 0; border-bottom: 1px solid rgba(128, 128, 128, 0.3); From 871237d84fec92a2336e5dc0f70269e1da374764 Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Sun, 2 Jul 2017 15:33:11 +0200 Subject: [PATCH 11/19] Updated Changelog for the release 1.0.18 --- Changelog | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Changelog b/Changelog index fcf3c16c..95b7dab8 100644 --- a/Changelog +++ b/Changelog @@ -1,3 +1,11 @@ +1.0.18: 2017-07-02 + * [datacenterlight] Introduced the new flow. Landing page -> Payment -> Order confirmation -> Success + * [datacenterlight] Fixed issue showing local time to the user in order confirmation page, vm pages (like ssh keys) + * [hosting] Fixed responsive issue while user signup + * [hosting] Fixed 500 error when user requests for a vm whose id does not belong to him + * [datacenterlight] Refactored partially dcl text and dcl support email to be obtained from env parameters + * [datacenterlight] Updated DE translations + * [hosting] Updated email text for user activation 1.0.17: 2017-06-16 * [datacenterlight] Cleanup OrderView useless code * [datacenterlight] Replaced GiB to GB @@ -5,7 +13,7 @@ * [datacenterlight] Fixed translations * [datacenterlight] Added email confirmation feature * [datacenterlight] Changed logo on datacerlight dashboard - * [datacenterlight] Credit card input disappearance fix + * [datacenterlight] Credit card input disappearance fix 1.0.16: 2017-06-15 * [datacenterlight] .po file issue with multiple definition fixed * [datacenterlight] Navbar items in dcl user area rearranged From 1f658a425f5bdea15eb9cbd981af466bdee20c56 Mon Sep 17 00:00:00 2001 From: Andrii Marynets Date: Sun, 2 Jul 2017 17:56:49 +0300 Subject: [PATCH 12/19] Merge with master --- digitalglarus/templates/base_glarus.html | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) diff --git a/digitalglarus/templates/base_glarus.html b/digitalglarus/templates/base_glarus.html index 424f3aac..b94c813e 100644 --- a/digitalglarus/templates/base_glarus.html +++ b/digitalglarus/templates/base_glarus.html @@ -39,27 +39,13 @@ - + + {% include 'google_analytics.html' %} + From fd856d7613d3db5c5eba45a01c5c7b73ba9fac71 Mon Sep 17 00:00:00 2001 From: Mondi Geetha Date: Sun, 2 Jul 2017 20:55:08 +0530 Subject: [PATCH 13/19] Reverted back email templates as they are part of another PR --- .../emails/request_access_confirmation.html | 8 ++++---- .../emails/request_access_notification.html | 8 ++++---- .../emails/request_beta_access_notification.html | 8 ++++---- .../templates/datacenterlight/emails/user_activation.html | 8 ++++---- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/datacenterlight/templates/datacenterlight/emails/request_access_confirmation.html b/datacenterlight/templates/datacenterlight/emails/request_access_confirmation.html index 2f71944f..e96a8ef1 100644 --- a/datacenterlight/templates/datacenterlight/emails/request_access_confirmation.html +++ b/datacenterlight/templates/datacenterlight/emails/request_access_confirmation.html @@ -74,7 +74,7 @@
-
+ logo @@ -95,12 +95,12 @@
- -
+ {% trans "Thank you for your request." %}
+

{% trans "You are one step away from being our beta tester!" %}

{% trans "Currently we are running our tests to make sure everything runs perfectly." %}
{% trans "In the meantime, we would like to ask you a little patience
until our team contacts you with beta access." %}
@@ -117,7 +117,7 @@

-
Your data center light team
+
Your data center light team
diff --git a/datacenterlight/templates/datacenterlight/emails/request_access_notification.html b/datacenterlight/templates/datacenterlight/emails/request_access_notification.html index 095c917e..09531ba6 100644 --- a/datacenterlight/templates/datacenterlight/emails/request_access_notification.html +++ b/datacenterlight/templates/datacenterlight/emails/request_access_notification.html @@ -73,7 +73,7 @@
-
+ logo @@ -94,12 +94,12 @@
- - @@ -113,7 +113,7 @@
+ An user requested a beta access
+

User {{email}} requested beta access

-
Your data center light team
+
Your data center light team
diff --git a/datacenterlight/templates/datacenterlight/emails/request_beta_access_notification.html b/datacenterlight/templates/datacenterlight/emails/request_beta_access_notification.html index c6f3033e..7991eb69 100644 --- a/datacenterlight/templates/datacenterlight/emails/request_beta_access_notification.html +++ b/datacenterlight/templates/datacenterlight/emails/request_beta_access_notification.html @@ -73,7 +73,7 @@
-
+ logo @@ -94,14 +94,14 @@
- -
+ An user requested a beta access
+

User {{email}} requested beta access

{% for vm in vms %} Type: {{vm.type}} - Amount: {{vm.amount}} @@ -119,7 +119,7 @@
-
Your data center light team
+
Your data center light team
diff --git a/datacenterlight/templates/datacenterlight/emails/user_activation.html b/datacenterlight/templates/datacenterlight/emails/user_activation.html index e591fc54..bf688127 100644 --- a/datacenterlight/templates/datacenterlight/emails/user_activation.html +++ b/datacenterlight/templates/datacenterlight/emails/user_activation.html @@ -74,7 +74,7 @@
-
+ logo @@ -95,12 +95,12 @@
- -
+ {{dcl_text}} {% trans 'account activation' %}
+

{% blocktrans %} You can activate your {{dcl_text}} account by clicking here.

@@ -120,7 +120,7 @@

-
{% trans 'Your' %} {{dcl_text}} {% trans 'team' %}
+
{% trans 'Your' %} {{dcl_text}} {% trans 'team' %}
From 5b6a0691379a7c259d80f9f895d262b54475a220 Mon Sep 17 00:00:00 2001 From: Mondi Geetha Date: Sun, 2 Jul 2017 23:16:19 +0530 Subject: [PATCH 14/19] Added DE translations for error messages --- .../locale/de/LC_MESSAGES/django.po | 56 +++++++++++++------ .../templates/datacenterlight/index.html | 2 +- 2 files changed, 39 insertions(+), 19 deletions(-) diff --git a/datacenterlight/locale/de/LC_MESSAGES/django.po b/datacenterlight/locale/de/LC_MESSAGES/django.po index 6eeb605b..a0c9a470 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-07-01 02:15+0530\n" +"POT-Creation-Date: 2017-07-02 23:08+0530\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -18,14 +18,6 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: templates/datacenterlight/base.html:72 -msgid "Please enter your name" -msgstr "Bitte gib Deinen Namen ein" - -#: templates/datacenterlight/base.html:73 -msgid "Please enter a valid email address" -msgstr "Bitte gib eine gültige E-Mail-Adresse ein" - #: templates/datacenterlight/beta_access.html:13 msgid "Enter name" msgstr "Name" @@ -264,41 +256,61 @@ msgstr "MwSt. inklusive" msgid "Hosted in Switzerland" msgstr "Standort: Schweiz" -#: templates/datacenterlight/index.html:173 +#: templates/datacenterlight/index.html:161 +msgid "Please enter a value greater than or equal to 1." +msgstr "Bitte gib einen Wert größer oder gleich 1 ein." + +#: templates/datacenterlight/index.html:170 +msgid "Please enter a value greater than or equal to 2." +msgstr "Bitte gib einen Wert größer oder gleich 2 ein." + +#: templates/datacenterlight/index.html:179 +msgid "Please enter a value greater than or equal to 10." +msgstr "Bitte gib einen Wert größer oder gleich 10 ein" + +#: templates/datacenterlight/index.html:180 #: templates/datacenterlight/pricing.html:50 msgid "GB Storage (SSD)" msgstr "GB Storage (SSD)" -#: templates/datacenterlight/index.html:189 +#: templates/datacenterlight/index.html:199 msgid "Name" msgstr "" -#: templates/datacenterlight/index.html:190 +#: templates/datacenterlight/index.html:200 msgid "Your Name" msgstr "Dein Name" -#: templates/datacenterlight/index.html:193 +#: templates/datacenterlight/index.html:200 +msgid "Please enter your name" +msgstr "Bitte gib Deinen Namen ein" + +#: templates/datacenterlight/index.html:214 msgid "Email" msgstr "E-Mail-Adresse" -#: templates/datacenterlight/index.html:194 +#: templates/datacenterlight/index.html:215 msgid "Your Email" msgstr "Deine E-Mail" -#: templates/datacenterlight/index.html:197 +#: templates/datacenterlight/index.html:215 +msgid "Please enter a valid email address" +msgstr "Bitte gib eine gültige E-Mailadresse ein" + +#: templates/datacenterlight/index.html:228 #: templates/datacenterlight/pricing.html:79 msgid "Order Now!" msgstr "Bestelle jetzt!" -#: templates/datacenterlight/index.html:226 +#: templates/datacenterlight/index.html:254 msgid "Switzerland " msgstr "Schweiz" -#: templates/datacenterlight/index.html:243 +#: templates/datacenterlight/index.html:271 msgid "Questions?" msgstr "Fragen?" -#: templates/datacenterlight/index.html:243 +#: templates/datacenterlight/index.html:271 msgid "Contact us!" msgstr "Kontaktiere uns!" @@ -380,6 +392,14 @@ msgstr "" msgid "as soon as possible!" msgstr "" +#: views.py:234 +msgid "is not a proper name" +msgstr "ist kein gültiger Name" + +#: views.py:241 +msgid "is not a proper email" +msgstr "ist keine gültige E-Mailadresse" + #~ msgid "Buy VM" #~ msgstr "VM Kaufen" diff --git a/datacenterlight/templates/datacenterlight/index.html b/datacenterlight/templates/datacenterlight/index.html index b05f617a..31e02fb9 100755 --- a/datacenterlight/templates/datacenterlight/index.html +++ b/datacenterlight/templates/datacenterlight/index.html @@ -211,7 +211,7 @@
- +
From 3a865bd01089612b3d44a324786d537afeae88cf Mon Sep 17 00:00:00 2001 From: Mondi Geetha Date: Sun, 2 Jul 2017 23:33:33 +0530 Subject: [PATCH 15/19] Increased minimum length of the name to 3 --- 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 31e02fb9..6807575d 100755 --- a/datacenterlight/templates/datacenterlight/index.html +++ b/datacenterlight/templates/datacenterlight/index.html @@ -197,7 +197,7 @@
- +
{% for message in messages %} From f67343ab5c6ef7b960394830bed7f81ab3f8b9c9 Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Sun, 2 Jul 2017 21:26:10 +0200 Subject: [PATCH 16/19] Added missing validation code --- datacenterlight/templates/datacenterlight/base.html | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/datacenterlight/templates/datacenterlight/base.html b/datacenterlight/templates/datacenterlight/base.html index becb36d8..6074ece9 100644 --- a/datacenterlight/templates/datacenterlight/base.html +++ b/datacenterlight/templates/datacenterlight/base.html @@ -61,4 +61,9 @@ + From 5ea35bd4d8966759c0f30182a6aa7be554712483 Mon Sep 17 00:00:00 2001 From: Andrii Marynets Date: Sun, 2 Jul 2017 23:00:56 +0300 Subject: [PATCH 17/19] add ids for dev and staging server --- dynamicweb/settings/base.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dynamicweb/settings/base.py b/dynamicweb/settings/base.py index 08ed7fe5..ba304ff9 100644 --- a/dynamicweb/settings/base.py +++ b/dynamicweb/settings/base.py @@ -517,5 +517,7 @@ DCL_SUPPORT_FROM_ADDRESS = env('DCL_SUPPORT_FROM_ADDRESS') GOOGLE_ANALYTICS_PROPERTY_IDS = { 'datacenterlight.ch': 'UA-62285904-9', 'digitalglarus.ch': 'UA-62285904-2', - '127.0.0.1:8000': 'test' + '127.0.0.1:8000': 'localhost', + 'dynamicweb-development.ungleich.ch': 'development', + 'dynamicweb-staging.ungleich.ch': 'staging' } From 8b9359ede52786ff4c8b54b945f61bfed7cb44a0 Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Sun, 2 Jul 2017 23:37:31 +0200 Subject: [PATCH 18/19] Reverted back to the default behavior of bootstrap-validator --- datacenterlight/templates/datacenterlight/base.html | 5 ----- datacenterlight/templates/datacenterlight/index.html | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/datacenterlight/templates/datacenterlight/base.html b/datacenterlight/templates/datacenterlight/base.html index 6074ece9..becb36d8 100644 --- a/datacenterlight/templates/datacenterlight/base.html +++ b/datacenterlight/templates/datacenterlight/base.html @@ -61,9 +61,4 @@ - diff --git a/datacenterlight/templates/datacenterlight/index.html b/datacenterlight/templates/datacenterlight/index.html index 6807575d..822858ae 100755 --- a/datacenterlight/templates/datacenterlight/index.html +++ b/datacenterlight/templates/datacenterlight/index.html @@ -139,7 +139,7 @@
-
+ {% csrf_token %}

{% trans "VM hosting" %}

From bc73ad3c4cc86130ab1fe61e83e45cfebc27faa5 Mon Sep 17 00:00:00 2001 From: Andrii Marynets Date: Mon, 3 Jul 2017 22:32:32 +0300 Subject: [PATCH 19/19] Ticket #3539. Fix issues: not loading favicon.ico on digitalglarus.ch --- digitalglarus/templates/new_base_glarus.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/digitalglarus/templates/new_base_glarus.html b/digitalglarus/templates/new_base_glarus.html index c970f79b..826b49c0 100644 --- a/digitalglarus/templates/new_base_glarus.html +++ b/digitalglarus/templates/new_base_glarus.html @@ -56,7 +56,7 @@ ga('send', 'pageview'); - +