From 05e19ffb68eafda6cd76327b86940ade7f1452b6 Mon Sep 17 00:00:00 2001
From: "M.Ravi"
Date: Sun, 14 May 2017 15:36:11 +0530
Subject: [PATCH 1/2] Created url for buy button on datacenterlight home page
and redirection of ^hosting/ endpoint to take to hosting app's login page.
---
datacenterlight/templates/datacenterlight/index.html | 2 +-
dynamicweb/urls.py | 3 +++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/datacenterlight/templates/datacenterlight/index.html b/datacenterlight/templates/datacenterlight/index.html
index 2efe15cb..4d90769c 100755
--- a/datacenterlight/templates/datacenterlight/index.html
+++ b/datacenterlight/templates/datacenterlight/index.html
@@ -231,7 +231,7 @@
2 GiB RAM,
{% trans "15 GiB storage(SSD)" %}
- {% trans "Buy Now!" %} {% trans "More Info" %}
+ {% trans "Buy Now!" %} {% trans "More Info" %}
diff --git a/dynamicweb/urls.py b/dynamicweb/urls.py
index adbe0242..0b1a0844 100644
--- a/dynamicweb/urls.py
+++ b/dynamicweb/urls.py
@@ -8,6 +8,8 @@ from django.conf import settings
from hosting.views import RailsHostingView, DjangoHostingView, NodeJSHostingView
from membership import urls as membership_urls
from ungleich_page.views import LandingView
+from django.views.generic import RedirectView
+from django.core.urlresolvers import reverse_lazy
import debug_toolbar
urlpatterns = [ url(r'^index.html$', LandingView.as_view()),
@@ -28,6 +30,7 @@ urlpatterns += i18n_patterns('',
url(r'^/?$', LandingView.as_view()),
url(r'^admin/', include(admin.site.urls)),
url(r'^datacenterlight', include('datacenterlight.urls', namespace="datacenterlight")),
+ url(r'^hosting/', RedirectView.as_view(url=reverse_lazy('hosting:login')), name='redirect_hosting_login'),
url(r'^alplora', include('alplora.urls', namespace="alplora")),
url(r'^membership/', include(membership_urls)),
url(r'^digitalglarus/', include('digitalglarus.urls',
From 1e2b8b1652bb54e75ce71127ab859b776b5b286a Mon Sep 17 00:00:00 2001
From: Modulos
Date: Sun, 14 May 2017 12:22:10 +0200
Subject: [PATCH 2/2] Add connection error handling
---
.../hosting/create_virtual_machine.html | 13 ++-
.../templates/hosting/virtual_machines.html | 11 ++-
hosting/views.py | 80 +++++++++++++++----
opennebula_api/models.py | 25 ++++--
opennebula_api/serializers.py | 6 +-
5 files changed, 106 insertions(+), 29 deletions(-)
diff --git a/hosting/templates/hosting/create_virtual_machine.html b/hosting/templates/hosting/create_virtual_machine.html
index 67a61ead..af618740 100644
--- a/hosting/templates/hosting/create_virtual_machine.html
+++ b/hosting/templates/hosting/create_virtual_machine.html
@@ -5,9 +5,19 @@
+
+
+ {% if messages %}
+
+ {% for message in messages %}
+ {{ message }}
+ {% endfor %}
+
+ {% endif %}
+
+ {% if not error %}
{% trans "New Virtual Machine"%}
-
+ {% endif %}
diff --git a/hosting/templates/hosting/virtual_machines.html b/hosting/templates/hosting/virtual_machines.html
index 2387f89d..e7dee999 100644
--- a/hosting/templates/hosting/virtual_machines.html
+++ b/hosting/templates/hosting/virtual_machines.html
@@ -7,10 +7,6 @@
+ {% endif %}
{% if is_paginated %}