From 5dd54f4219d40a7c5d52c7ca22de874040ee915a Mon Sep 17 00:00:00 2001 From: Levi Date: Sat, 20 May 2017 11:06:10 -0500 Subject: [PATCH] added redirect --- datacenterlight/views.py | 6 ++++++ hosting/views.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/datacenterlight/views.py b/datacenterlight/views.py index afc16f03..ce50bd5a 100644 --- a/datacenterlight/views.py +++ b/datacenterlight/views.py @@ -6,6 +6,8 @@ from django.contrib import messages from django.core.urlresolvers import reverse_lazy, reverse from utils.mailer import BaseEmail +from opennebula_api.models import OpenNebulaManager +from opennebula_api.serializers import VirtualMachineTemplateSerializer class LandingProgramView(TemplateView): template_name = "datacenterlight/landing.html" @@ -27,6 +29,10 @@ class BetaProgramView(CreateView): 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 diff --git a/hosting/views.py b/hosting/views.py index 45e1291d..9f978b41 100644 --- a/hosting/views.py +++ b/hosting/views.py @@ -171,7 +171,7 @@ class IndexView(View): class LoginView(LoginViewMixin): template_name = "hosting/login.html" form_class = HostingUserLoginForm - success_url = reverse_lazy('hosting:orders') + success_url = reverse_lazy('hosting:virtual_machines') class SignupView(CreateView):