From 35d6fd8fd33ec3f102d2731102d13fb4ab178b2c Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Thu, 22 Feb 2018 17:53:47 +0100 Subject: [PATCH] Remove datacenterlight/order-success urlconf, view and template as we are not using it anymore --- .../templates/datacenterlight/success.html | 32 ------------------- datacenterlight/urls.py | 4 +-- datacenterlight/views.py | 20 ------------ 3 files changed, 1 insertion(+), 55 deletions(-) delete mode 100644 datacenterlight/templates/datacenterlight/success.html diff --git a/datacenterlight/templates/datacenterlight/success.html b/datacenterlight/templates/datacenterlight/success.html deleted file mode 100644 index ff553f3c..00000000 --- a/datacenterlight/templates/datacenterlight/success.html +++ /dev/null @@ -1,32 +0,0 @@ -{% extends "datacenterlight/base.html" %} -{% load staticfiles i18n %} -{% block content %} - -
- -
-

{% trans "Thank you for order! Our team will contact you via email" %}

- {% if LANGUAGE_CODE == 'en-us'%} -

{% trans "as soon as possible!" %}

- {% endif %} -
- -
- - - -{% endblock %} \ No newline at end of file diff --git a/datacenterlight/urls.py b/datacenterlight/urls.py index b6497f50..b2aab8de 100644 --- a/datacenterlight/urls.py +++ b/datacenterlight/urls.py @@ -1,8 +1,7 @@ from django.conf.urls import url from .views import ( - IndexView, LandingProgramView, - SuccessView, PaymentOrderView, OrderConfirmationView, + IndexView, LandingProgramView,PaymentOrderView, OrderConfirmationView, WhyDataCenterLightView, ContactUsView ) @@ -21,7 +20,6 @@ urlpatterns = [ url(r'^payment/?$', PaymentOrderView.as_view(), name='payment'), url(r'^order-confirmation/?$', OrderConfirmationView.as_view(), name='order_confirmation'), - url(r'^order-success/?$', SuccessView.as_view(), name='order_success'), url(r'^contact/?$', ContactUsView.as_view(), name='contact_us'), url(r'glasfaser/?$', TemplateView.as_view(template_name='ungleich_page/glasfaser.html'), diff --git a/datacenterlight/views.py b/datacenterlight/views.py index c22d82a5..25374dfb 100644 --- a/datacenterlight/views.py +++ b/datacenterlight/views.py @@ -78,26 +78,6 @@ class LandingProgramView(TemplateView): template_name = "datacenterlight/landing.html" -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) - - class IndexView(CreateView): template_name = "datacenterlight/index.html" success_url = "/datacenterlight#requestform"