diff --git a/datacenterlight/views.py b/datacenterlight/views.py index 4bc2a1d..9c9ffd8 100755 --- a/datacenterlight/views.py +++ b/datacenterlight/views.py @@ -236,6 +236,7 @@ class WhyDataCenterLightView(IndexView): template_name = "datacenterlight/whydatacenterlight.html" +@method_decorator(decorator=never_cache, name='get') class PaymentOrderView(FormView): template_name = 'datacenterlight/landing_payment.html' @@ -313,12 +314,10 @@ class PaymentOrderView(FormView): return context - @cache_control(no_cache=True, must_revalidate=True, no_store=True) def get(self, request, *args, **kwargs): - request.session.pop('vat_validation_status') - request.session.pop('card_id') - request.session.pop('token') - request.session.pop('id_payment_method') + for k in ['vat_validation_status', 'card_id', 'token', 'id_payment_method']: + if k in request.session: + request.session.pop(k) logger.debug("Session: %s" % str(request.session)) for key, value in request.session.items(): logger.debug("Session: %s %s" % (key, value)) diff --git a/dynamicweb2/settings.py b/dynamicweb2/settings.py index cb773e8..32dfb9f 100644 --- a/dynamicweb2/settings.py +++ b/dynamicweb2/settings.py @@ -54,7 +54,8 @@ INSTALLED_APPS = [ 'filer', 'datacenterlight', 'opennebula_api', - 'sekizai' + 'sekizai', + 'webhook' ] MIDDLEWARE = [ diff --git a/dynamicweb2/urls.py b/dynamicweb2/urls.py index c17e2c9..14c3e96 100644 --- a/dynamicweb2/urls.py +++ b/dynamicweb2/urls.py @@ -51,7 +51,7 @@ from django.views.static import serve as static_serve urlpatterns = [ - path('admin/', admin.site.urls), + re_path('^admin/', admin.site.urls), re_path(r'^index.html$', LandingView.as_view()), # re_path(r'^open_api/', include('opennebula_api.urls', namespace='opennebula_api',), name="opennebula_api"), re_path(r'^railshosting/', RailsHostingView.as_view(), name="rails.hosting"), @@ -63,12 +63,12 @@ urlpatterns = [ path('i18n/', include('django.conf.urls.i18n')), # Language switcher URL re_path(r'^cms/', include('cms.urls')), ] -# urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) +urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) -urlpatterns += i18n_patterns( - - # Add other internationalized patterns here if needed -) +# urlpatterns += i18n_patterns( +# +# # Add other internationalized patterns here if needed +# )