added redirect

This commit is contained in:
Levi 2017-05-20 11:06:10 -05:00
parent bcc32174b2
commit 5dd54f4219
2 changed files with 7 additions and 1 deletions

View file

@ -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

View file

@ -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):