From 157cc5ac5d7161f5ff4442aa6936dae237988678 Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Mon, 8 Jan 2018 00:56:54 +0530 Subject: [PATCH 01/26] fix datacenterlight templates --- .../datacenterlight/base_hosting.html | 117 ++++++++++++++++++ .../emails/base_email_datacenterlight.html | 2 + .../_calculator_form.html} | 0 .../templates/datacenterlight/index.html | 2 +- .../datacenterlight/landing_payment.html | 2 +- .../datacenterlight/order_detail.html | 2 +- .../datacenterlight/whydatacenterlight.html | 2 +- datacenterlight/urls.py | 4 +- datacenterlight/views.py | 2 + 9 files changed, 127 insertions(+), 6 deletions(-) create mode 100644 datacenterlight/templates/datacenterlight/base_hosting.html rename datacenterlight/templates/datacenterlight/{calculator_form.html => includes/_calculator_form.html} (100%) diff --git a/datacenterlight/templates/datacenterlight/base_hosting.html b/datacenterlight/templates/datacenterlight/base_hosting.html new file mode 100644 index 00000000..613d67a9 --- /dev/null +++ b/datacenterlight/templates/datacenterlight/base_hosting.html @@ -0,0 +1,117 @@ +{% load staticfiles bootstrap3%} +{% load i18n %} + + + + + + + + + + + + ungleich + + + + + + + + + + + + + + + {% block css_extra %} + {% endblock css_extra %} + + + + + + + + + + + + + {% include "google_analytics.html" %} + + + + + + + {% block navbar %} + {% include "hosting/includes/_navbar_user.html" %} + {% endblock navbar %} + +
+ {% block content %} + {% endblock %} +
+ + + {% if request.user.is_authenticated %} + + {% else %} + + {% endif %} + + + + + + + + + + + + + + + + + + + + + {% block js_extra %} + {% comment %} + this block is above some files, because on stripe error scripts below the stripe + script are not properly executed. + {% endcomment %} + {% endblock js_extra %} + + + + + + + + + + + + + + + + + + diff --git a/datacenterlight/templates/datacenterlight/emails/base_email_datacenterlight.html b/datacenterlight/templates/datacenterlight/emails/base_email_datacenterlight.html index be8479d9..3f06b069 100644 --- a/datacenterlight/templates/datacenterlight/emails/base_email_datacenterlight.html +++ b/datacenterlight/templates/datacenterlight/emails/base_email_datacenterlight.html @@ -1,5 +1,7 @@ {% load static from staticfiles %} {% load i18n %} +{% comment %} unused {% endcomment %} +
- {% include "datacenterlight/calculator_form.html" %} + {% include "datacenterlight/includes/_calculator_form.html" %}
diff --git a/datacenterlight/templates/datacenterlight/landing_payment.html b/datacenterlight/templates/datacenterlight/landing_payment.html index f2f75e9c..8e779576 100644 --- a/datacenterlight/templates/datacenterlight/landing_payment.html +++ b/datacenterlight/templates/datacenterlight/landing_payment.html @@ -1,4 +1,4 @@ -{% extends "hosting/base_short.html" %} +{% extends "datacenterlight/base_hosting.html" %} {% load staticfiles bootstrap3 i18n %} {% block css_extra %} diff --git a/datacenterlight/templates/datacenterlight/order_detail.html b/datacenterlight/templates/datacenterlight/order_detail.html index ec4befc9..79119777 100644 --- a/datacenterlight/templates/datacenterlight/order_detail.html +++ b/datacenterlight/templates/datacenterlight/order_detail.html @@ -1,4 +1,4 @@ -{% extends "hosting/order_detail.html" %} +{% extends "datacenterlight/base_hosting.html" %} {% load i18n %} {% block navbar %} diff --git a/datacenterlight/templates/datacenterlight/whydatacenterlight.html b/datacenterlight/templates/datacenterlight/whydatacenterlight.html index c54156b6..ee6cfefa 100644 --- a/datacenterlight/templates/datacenterlight/whydatacenterlight.html +++ b/datacenterlight/templates/datacenterlight/whydatacenterlight.html @@ -137,7 +137,7 @@
- {% include "datacenterlight/calculator_form.html" %} + {% include "datacenterlight/includes/_calculator_form.html" %}
diff --git a/datacenterlight/urls.py b/datacenterlight/urls.py index 2cd0723f..8d6273ef 100644 --- a/datacenterlight/urls.py +++ b/datacenterlight/urls.py @@ -17,8 +17,8 @@ urlpatterns = [ url(r'^l/$', IndexView.as_view(), name='index_l'), url(r'^whydatacenterlight/?$', WhyDataCenterLightView.as_view(), name='whydatacenterlight'), - url(r'^beta-program/?$', BetaProgramView.as_view(), name='beta'), - url(r'^landing/?$', LandingProgramView.as_view(), name='landing'), + # url(r'^beta-program/?$', BetaProgramView.as_view(), name='beta'), + # url(r'^landing/?$', LandingProgramView.as_view(), name='landing'), url(r'^payment/?$', PaymentOrderView.as_view(), name='payment'), url(r'^order-confirmation/?$', OrderConfirmationView.as_view(), name='order_confirmation'), diff --git a/datacenterlight/views.py b/datacenterlight/views.py index fda8c9c9..8a41005f 100644 --- a/datacenterlight/views.py +++ b/datacenterlight/views.py @@ -76,6 +76,7 @@ class ContactUsView(FormView): class LandingProgramView(TemplateView): + # FIXME: template doesn't exist template_name = "datacenterlight/landing.html" @@ -143,6 +144,7 @@ class BetaAccessView(FormView): class BetaProgramView(CreateView): + # FIXME: template doesn't exist template_name = "datacenterlight/beta.html" model = BetaAccessVM fields = '__all__' From 0697492ab8cc2912adbf2fbf7c82855cda988ade Mon Sep 17 00:00:00 2001 From: Arvind Tiwari Date: Mon, 8 Jan 2018 07:36:30 +0530 Subject: [PATCH 02/26] removed unused css files --- datacenterlight/templates/datacenterlight/base_hosting.html | 3 --- datacenterlight/templates/datacenterlight/beta_success.html | 1 - dynamicweb/settings/base.py | 2 +- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/datacenterlight/templates/datacenterlight/base_hosting.html b/datacenterlight/templates/datacenterlight/base_hosting.html index 613d67a9..848b8a46 100644 --- a/datacenterlight/templates/datacenterlight/base_hosting.html +++ b/datacenterlight/templates/datacenterlight/base_hosting.html @@ -21,10 +21,8 @@ - - {% block css_extra %} {% endblock css_extra %} @@ -49,7 +47,6 @@ - {% block navbar %} {% include "hosting/includes/_navbar_user.html" %} {% endblock navbar %} diff --git a/datacenterlight/templates/datacenterlight/beta_success.html b/datacenterlight/templates/datacenterlight/beta_success.html index 60df607c..7ac49457 100644 --- a/datacenterlight/templates/datacenterlight/beta_success.html +++ b/datacenterlight/templates/datacenterlight/beta_success.html @@ -1,4 +1,3 @@ - {% load i18n %} -
+ {% csrf_token %}
+
{{contact_form.name.errors}}
@@ -30,6 +31,7 @@
+
{{contact_form.email.errors}}
@@ -37,6 +39,7 @@
+
{{contact_form.message.errors}}
diff --git a/datacenterlight/templates/datacenterlight/includes/_navbar.html b/datacenterlight/templates/datacenterlight/includes/_navbar.html index e2f1edc0..2f435704 100644 --- a/datacenterlight/templates/datacenterlight/includes/_navbar.html +++ b/datacenterlight/templates/datacenterlight/includes/_navbar.html @@ -1,6 +1,6 @@ -{% load staticfiles i18n%} -{% load custom_tags %} +{% load staticfiles i18n custom_tags %} {% get_current_language as LANGUAGE_CODE %} +