added redirect
This commit is contained in:
parent
bcc32174b2
commit
5dd54f4219
2 changed files with 7 additions and 1 deletions
|
@ -6,6 +6,8 @@ from django.contrib import messages
|
||||||
from django.core.urlresolvers import reverse_lazy, reverse
|
from django.core.urlresolvers import reverse_lazy, reverse
|
||||||
from utils.mailer import BaseEmail
|
from utils.mailer import BaseEmail
|
||||||
|
|
||||||
|
from opennebula_api.models import OpenNebulaManager
|
||||||
|
from opennebula_api.serializers import VirtualMachineTemplateSerializer
|
||||||
|
|
||||||
class LandingProgramView(TemplateView):
|
class LandingProgramView(TemplateView):
|
||||||
template_name = "datacenterlight/landing.html"
|
template_name = "datacenterlight/landing.html"
|
||||||
|
@ -27,6 +29,10 @@ class BetaProgramView(CreateView):
|
||||||
def get_context_data(self, **kwargs):
|
def get_context_data(self, **kwargs):
|
||||||
vms = BetaAccessVMType.objects.all()
|
vms = BetaAccessVMType.objects.all()
|
||||||
context = super(BetaProgramView, self).get_context_data(**kwargs)
|
context = super(BetaProgramView, self).get_context_data(**kwargs)
|
||||||
|
|
||||||
|
# templates = OpenNebulaManager().get_templates()
|
||||||
|
# data = VirtualMachineTemplateSerializer(templates, many=True).data
|
||||||
|
|
||||||
context.update({
|
context.update({
|
||||||
'base_url': "{0}://{1}".format(self.request.scheme, self.request.get_host()),
|
'base_url': "{0}://{1}".format(self.request.scheme, self.request.get_host()),
|
||||||
'vms': vms
|
'vms': vms
|
||||||
|
|
|
@ -171,7 +171,7 @@ class IndexView(View):
|
||||||
class LoginView(LoginViewMixin):
|
class LoginView(LoginViewMixin):
|
||||||
template_name = "hosting/login.html"
|
template_name = "hosting/login.html"
|
||||||
form_class = HostingUserLoginForm
|
form_class = HostingUserLoginForm
|
||||||
success_url = reverse_lazy('hosting:orders')
|
success_url = reverse_lazy('hosting:virtual_machines')
|
||||||
|
|
||||||
|
|
||||||
class SignupView(CreateView):
|
class SignupView(CreateView):
|
||||||
|
|
Loading…
Reference in a new issue