Remove unused code
This commit is contained in:
parent
e7da97dc7f
commit
d8bb051f23
1 changed files with 4 additions and 42 deletions
|
@ -27,8 +27,8 @@ class PricingView(TemplateView):
|
||||||
}
|
}
|
||||||
except:
|
except:
|
||||||
messages.error( request,
|
messages.error( request,
|
||||||
'We could not load the VM templates due to a backend connection \
|
'We have a temporary problem to connect to our backend. \
|
||||||
error. Please try again in a few minutes'
|
Please try again in a few minutes'
|
||||||
)
|
)
|
||||||
context = {
|
context = {
|
||||||
'error' : 'connection'
|
'error' : 'connection'
|
||||||
|
@ -36,7 +36,6 @@ class PricingView(TemplateView):
|
||||||
|
|
||||||
return render(request, self.template_name, context)
|
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')
|
||||||
|
@ -54,7 +53,7 @@ class PricingView(TemplateView):
|
||||||
if not request.user.is_authenticated():
|
if not request.user.is_authenticated():
|
||||||
request.session['next'] = reverse('hosting:payment')
|
request.session['next'] = reverse('hosting:payment')
|
||||||
|
|
||||||
request.session['specs'] = {
|
request.session['specs'] = {
|
||||||
'cpu':cores,
|
'cpu':cores,
|
||||||
'memory': memory,
|
'memory': memory,
|
||||||
'disk_size': storage,
|
'disk_size': storage,
|
||||||
|
@ -66,7 +65,7 @@ class PricingView(TemplateView):
|
||||||
|
|
||||||
class BetaAccessView(FormView):
|
class BetaAccessView(FormView):
|
||||||
template_name = "datacenterlight/beta_access.html"
|
template_name = "datacenterlight/beta_access.html"
|
||||||
form_class = BetaAccessForm
|
form_class = BetaAccessForm
|
||||||
success_message = "Thank you, we will contact you as soon as possible"
|
success_message = "Thank you, we will contact you as soon as possible"
|
||||||
|
|
||||||
def form_valid(self, form):
|
def form_valid(self, form):
|
||||||
|
@ -151,43 +150,6 @@ class BetaProgramView(CreateView):
|
||||||
|
|
||||||
messages.add_message(self.request, messages.SUCCESS, self.success_message)
|
messages.add_message(self.request, messages.SUCCESS, self.success_message)
|
||||||
return HttpResponseRedirect(self.get_success_url())
|
return HttpResponseRedirect(self.get_success_url())
|
||||||
# return super(BetaProgramView, self).form_valid(form)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# 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',
|
|
||||||
# 'to': form.cleaned_data.get('email'),
|
|
||||||
# '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',
|
|
||||||
# '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 IndexView(CreateView):
|
class IndexView(CreateView):
|
||||||
|
|
Loading…
Reference in a new issue