Merge pull request #595 from tiwariav/task/dcl_url_reditect_to_cms

bugfix/ dcl redirect to cms
This commit is contained in:
Arvind Tiwari 2018-03-22 03:33:57 +05:30 committed by GitHub
commit d454dd4b92
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 8 deletions

View file

@ -8,12 +8,13 @@ from .views import (
urlpatterns = [ urlpatterns = [
url(r'^$', RedirectView.as_view(url='/cms/datacenterlight/'), url(r'^$', IndexView.as_view(), name='index'),
name='index'),
url(r'^t/$', IndexView.as_view(), name='index_t'), url(r'^t/$', IndexView.as_view(), name='index_t'),
url(r'^g/$', IndexView.as_view(), name='index_g'), url(r'^g/$', IndexView.as_view(), name='index_g'),
url(r'^f/$', IndexView.as_view(), name='index_f'), url(r'^f/$', IndexView.as_view(), name='index_f'),
url(r'^l/$', IndexView.as_view(), name='index_l'), url(r'^l/$', IndexView.as_view(), name='index_l'),
url(r'^new/$', RedirectView.as_view(url='/cms/datacenterlight/'),
name='cms_index'),
url(r'^whydatacenterlight/?$', WhyDataCenterLightView.as_view(), url(r'^whydatacenterlight/?$', WhyDataCenterLightView.as_view(),
name='whydatacenterlight'), name='whydatacenterlight'),
url(r'^payment/?$', PaymentOrderView.as_view(), name='payment'), url(r'^payment/?$', PaymentOrderView.as_view(), name='payment'),

View file

@ -96,12 +96,7 @@ class IndexView(CreateView):
for session_var in ['specs', 'user', 'billing_address_data']: for session_var in ['specs', 'user', 'billing_address_data']:
if session_var in request.session: if session_var in request.session:
del request.session[session_var] del request.session[session_var]
return HttpResponseRedirect(reverse('datacenterlight:cms_index'))
vm_templates = VMTemplate.objects.all()
context = {
'templates': vm_templates
}
return render(request, self.template_name, context)
def post(self, request): def post(self, request):
cores = request.POST.get('cpu') cores = request.POST.get('cpu')