-
{% include "datacenterlight/includes/_calculator_form.html" %}
diff --git a/datacenterlight/urls.py b/datacenterlight/urls.py
index 989d2d0a..c08d6f01 100644
--- a/datacenterlight/urls.py
+++ b/datacenterlight/urls.py
@@ -1,14 +1,11 @@
from django.conf.urls import url
+from django.views.generic import TemplateView
from .views import (
- # BetaProgramView, SuccessView, BetaAccessView,
IndexView, PaymentOrderView, OrderConfirmationView,
WhyDataCenterLightView, ContactUsView
)
-from django.views.generic import TemplateView
-
-
urlpatterns = [
url(r'^$', IndexView.as_view(), name='index'),
url(r'^t/$', IndexView.as_view(), name='index_t'),
@@ -20,12 +17,7 @@ urlpatterns = [
url(r'^payment/?$', PaymentOrderView.as_view(), name='payment'),
url(r'^order-confirmation/?$', OrderConfirmationView.as_view(),
name='order_confirmation'),
- # unused urls
- # url(r'^beta-program/?$', BetaProgramView.as_view(), name='beta'),
- # url(r'^order-success/?$', SuccessView.as_view(), name='order_success'),
- # url(r'^beta_access?$', BetaAccessView.as_view(), name='beta_access'),
url(r'^contact/?$', ContactUsView.as_view(), name='contact_us'),
-
url(r'glasfaser/?$',
TemplateView.as_view(template_name='ungleich_page/glasfaser.html'),
name='glasfaser'),
diff --git a/datacenterlight/views.py b/datacenterlight/views.py
index d8b10aaa..ac45d155 100644
--- a/datacenterlight/views.py
+++ b/datacenterlight/views.py
@@ -1,5 +1,5 @@
-import logging
import json
+import logging
from django import forms
from django.conf import settings
@@ -14,19 +14,18 @@ from django.views.decorators.cache import cache_control
from django.views.generic import FormView, CreateView, TemplateView, DetailView
from datacenterlight.tasks import create_vm_task
-from hosting.models import HostingOrder
from hosting.forms import HostingUserLoginForm
+from hosting.models import HostingOrder
from membership.models import CustomUser, StripeCustomer
from opennebula_api.serializers import VMTemplateSerializer
from utils.forms import (
BillingAddressForm, BillingAddressFormSignup
)
from utils.hosting_utils import get_vm_price
-from utils.mailer import BaseEmail
from utils.stripe_utils import StripeUtils
from utils.tasks import send_plain_email_task
-from .forms import BetaAccessForm, ContactForm
-from .models import BetaAccess, BetaAccessVMType, BetaAccessVM, VMTemplate
+from .forms import ContactForm
+from .models import VMTemplate
logger = logging.getLogger(__name__)
@@ -75,132 +74,8 @@ class ContactUsView(FormView):
contact_form=form))
-# TODO: remove this view
-class SuccessView(TemplateView):
- template_name = "datacenterlight/success.html"
-
- def get(self, request, *args, **kwargs):
- if 'specs' not in request.session or 'user' not in request.session:
- return HttpResponseRedirect(reverse('datacenterlight:index'))
- elif 'token' not in request.session:
- return HttpResponseRedirect(reverse('datacenterlight:payment'))
- elif 'order_confirmation' not in request.session:
- return HttpResponseRedirect(
- reverse('datacenterlight:order_confirmation'))
- else:
- for session_var in ['specs', 'user', 'template', 'billing_address',
- 'billing_address_data',
- 'token', 'customer']:
- if session_var in request.session:
- del request.session[session_var]
- return render(request, self.template_name)
-
-
-# TODO: remove this view
-class BetaAccessView(FormView):
- template_name = "datacenterlight/beta_access.html"
- form_class = BetaAccessForm
- success_message = "Thank you, we will contact you as soon as possible"
-
- def form_valid(self, form):
- context = {
- 'base_url': "{0}://{1}".format(self.request.scheme,
- self.request.get_host())
- }
-
- email_data = {
- 'subject': 'DatacenterLight Beta Access Request',
- 'from_address': '(datacenterlight) datacenterlight Support
',
- 'to': form.cleaned_data.get('email'),
- 'from': '(datacenterlight) DatacenterLight Support support@datacenterlight.ch',
- 'context': context,
- 'template_name': 'request_access_confirmation',
- 'template_path': 'datacenterlight/emails/'
- }
- email = BaseEmail(**email_data)
- email.send()
-
- context.update({
- 'email': form.cleaned_data.get('email')
- })
-
- email_data = {
- 'subject': 'DatacenterLight Beta Access Request',
- 'from_address': '(datacenterlight) datacenterlight Support ',
- 'to': 'info@ungleich.ch',
- 'context': context,
- 'template_name': 'request_access_notification',
- 'template_path': 'datacenterlight/emails/'
- }
- email = BaseEmail(**email_data)
- email.send()
-
- messages.add_message(self.request, messages.SUCCESS,
- self.success_message)
- return render(self.request, 'datacenterlight/beta_success.html', {})
-
-
-# TODO: remove this view
-class BetaProgramView(CreateView):
- # FIXME: template doesn't exist
- template_name = "datacenterlight/beta.html"
- model = BetaAccessVM
- fields = '__all__'
- # form_class = BetaAccessForm
- # success_url = "/datacenterlight#requestform"
- success_message = "Thank you, we will contact you as soon as possible"
-
- def get_success_url(self):
- success_url = reverse('datacenterlight:beta')
- success_url += "#success"
- return success_url
-
- def get_context_data(self, **kwargs):
- vms = BetaAccessVMType.objects.all()
- context = super(BetaProgramView, self).get_context_data(**kwargs)
-
- # templates = OpenNebulaManager().get_templates()
- # data = VirtualMachineTemplateSerializer(templates, many=True).data
-
- context.update({
- 'base_url': "{0}://{1}".format(self.request.scheme,
- self.request.get_host()),
- 'vms': vms
- })
- return context
-
- def post(self, request, *args, **kwargs):
- data = request.POST
- vms = BetaAccessVM.create(data)
-
- context = {
- 'base_url': "{0}://{1}".format(self.request.scheme,
- self.request.get_host()),
- 'email': data.get('email'),
- 'name': data.get('name'),
- 'vms': vms
- }
-
- email_data = {
- 'subject': 'DatacenterLight Beta Access Request',
- 'from_address': '(datacenterlight) datacenterlight Support ',
- 'to': 'info@ungleich.ch',
- 'context': context,
- 'template_name': 'request_beta_access_notification',
- 'template_path': 'datacenterlight/emails/'
- }
- email = BaseEmail(**email_data)
- email.send()
-
- messages.add_message(self.request, messages.SUCCESS,
- self.success_message)
- return HttpResponseRedirect(self.get_success_url())
-
-
class IndexView(CreateView):
template_name = "datacenterlight/index.html"
- model = BetaAccess
- form_class = BetaAccessForm
success_url = "/datacenterlight#requestform"
success_message = "Thank you, we will contact you as soon as possible"
@@ -292,48 +167,9 @@ class IndexView(CreateView):
})
return context
- def form_valid(self, form):
-
- context = {
- 'base_url': "{0}://{1}".format(self.request.scheme,
- self.request.get_host())
- }
-
- email_data = {
- 'subject': 'DatacenterLight Beta Access Request',
- 'from_address': '(datacenterlight) datacenterlight Support ',
- 'to': form.cleaned_data.get('email'),
- 'from': '(datacenterlight) DatacenterLight Support support@datacenterlight.ch',
- 'context': context,
- 'template_name': 'request_access_confirmation',
- 'template_path': 'datacenterlight/emails/'
- }
- email = BaseEmail(**email_data)
- email.send()
-
- context.update({
- 'email': form.cleaned_data.get('email')
- })
-
- email_data = {
- 'subject': 'DatacenterLight Beta Access Request',
- 'from_address': '(datacenterlight) datacenterlight Support ',
- 'to': 'info@ungleich.ch',
- 'context': context,
- 'template_name': 'request_access_notification',
- 'template_path': 'datacenterlight/emails/'
- }
- email = BaseEmail(**email_data)
- email.send()
-
- messages.add_message(self.request, messages.SUCCESS,
- self.success_message)
- return super(IndexView, self).form_valid(form)
-
class WhyDataCenterLightView(IndexView):
template_name = "datacenterlight/whydatacenterlight.html"
- model = BetaAccess
class PaymentOrderView(FormView):
diff --git a/digitalglarus/templates/digitalglarus/emails/membership_charge.html b/digitalglarus/templates/digitalglarus/emails/membership_charge.html
index e890a8c5..e5de2491 100644
--- a/digitalglarus/templates/digitalglarus/emails/membership_charge.html
+++ b/digitalglarus/templates/digitalglarus/emails/membership_charge.html
@@ -74,7 +74,7 @@
diff --git a/digitalglarus/templates/digitalglarus/emails/membership_monthly_charge.html b/digitalglarus/templates/digitalglarus/emails/membership_monthly_charge.html
index 4a962c41..a30e93a0 100644
--- a/digitalglarus/templates/digitalglarus/emails/membership_monthly_charge.html
+++ b/digitalglarus/templates/digitalglarus/emails/membership_monthly_charge.html
@@ -74,7 +74,7 @@
diff --git a/digitalglarus/urls.py b/digitalglarus/urls.py
index 92cd8e11..64a63303 100644
--- a/digitalglarus/urls.py
+++ b/digitalglarus/urls.py
@@ -14,7 +14,8 @@ from .views import ContactView, IndexView, HistoryView, LoginView, SignupView,\
# from membership.views import LoginRegistrationView
urlpatterns = [
- url(_(r'booking/payment/edit/?$'), EditCreditCardView.as_view(), name='edit_credit_card'),
+ url(_(r'booking/payment/edit/?$'),
+ EditCreditCardView.as_view(), name='edit_credit_card'),
url(_(r'^$'), IndexView.as_view(), name='landing'),
# url(_(r'new_credit_card/?$'), TermsAndConditions, name='TermsAndConditions'),
url(_(r'support-us/?$'), SupportusView.as_view(), name='supportus'),
@@ -30,14 +31,16 @@ urlpatterns = [
url(_(r'users/billing_address/?$'), UserBillingAddressView.as_view(),
name='user_billing_address'),
url(_(r'booking/?$'), BookingSelectDatesView.as_view(), name='booking'),
- url(_(r'booking/payment/?$'), BookingPaymentView.as_view(), name='booking_payment'),
+ url(_(r'booking/payment/?$'),
+ BookingPaymentView.as_view(), name='booking_payment'),
url(_(r'booking/orders/(?P\d+)/?$'), OrdersBookingDetailView.as_view(),
name='booking_orders_detail'),
# url(_(r'booking/orders/(?P\d+)/cancel/?$'), BookingCancelView.as_view(),
# name='booking_orders_cancel'),
url(_(r'booking/orders/?$'), BookingOrdersListView.as_view(),
name='booking_orders_list'),
- url(_(r'membership/payment/?$'), MembershipPaymentView.as_view(), name='membership_payment'),
+ url(_(r'membership/payment/?$'),
+ MembershipPaymentView.as_view(), name='membership_payment'),
url(_(r'membership/activated/?$'), MembershipActivatedView.as_view(),
name='membership_activated'),
url(_(r'membership/deactivate/?$'), MembershipDeactivateView.as_view(),
@@ -53,7 +56,7 @@ urlpatterns = [
url(_(r'membership/orders/?$'), MembershipOrdersListView.as_view(),
name='membership_orders_list'),
url(_(r'supporters/?$'), views.supporters, name='supporters'),
- # url(_(r'support-us/?$'), views.support, name='support'),
+ url(_(r'support-us/?$'), views.support, name='support'),
url(r'^blog/(?P\w[-\w]*)/$', views.blog_detail, name='blog-detail'),
url(r'blog/$', views.blog, name='blog'),
]
diff --git a/hosting/static/hosting/img/Beta.png b/hosting/static/hosting/img/Beta.png
deleted file mode 100644
index 76a3983f..00000000
Binary files a/hosting/static/hosting/img/Beta.png and /dev/null differ
diff --git a/hosting/templates/hosting/includes/_header.html b/hosting/templates/hosting/includes/_header.html
index 9e609816..6f9b4a5c 100644
--- a/hosting/templates/hosting/includes/_header.html
+++ b/hosting/templates/hosting/includes/_header.html
@@ -7,7 +7,6 @@
-
{{ domain }}
{{ hosting_long }} as easy as possible