{% if not messages and not form.non_field_errors %}
- {% blocktrans %}You are not making any payment yet. After submitting your card information, you will be taken to the Confirm Order Page.{% endblocktrans %}
+ {% trans "You are not making any payment yet. After submitting your card information, you will be taken to the Confirm Order Page." %}
{% endif %}
diff --git a/hosting/urls.py b/hosting/urls.py
index 23709904..e6b6fee3 100644
--- a/hosting/urls.py
+++ b/hosting/urls.py
@@ -1,17 +1,20 @@
from django.conf.urls import url
from django.contrib.auth import views as auth_views
-from .views import DjangoHostingView, RailsHostingView, PaymentVMView,\
- NodeJSHostingView, LoginView, SignupView, SignupValidateView, SignupValidatedView, IndexView, \
- OrdersHostingListView, OrdersHostingDetailView, VirtualMachinesPlanListView,\
- VirtualMachineView, OrdersHostingDeleteView, NotificationsView, \
- MarkAsReadNotificationView, PasswordResetView, PasswordResetConfirmView, HostingPricingView,\
- CreateVirtualMachinesView, HostingBillListView, HostingBillDetailView, \
- SSHKeyDeleteView, SSHKeyCreateView, SSHKeyListView, SSHKeyChoiceView
+from .views import (
+ DjangoHostingView, RailsHostingView, PaymentVMView, NodeJSHostingView,
+ LoginView, SignupView, SignupValidateView, SignupValidatedView, IndexView,
+ NotificationsView, OrdersHostingListView, OrdersHostingDetailView,
+ VirtualMachinesPlanListView, VirtualMachineView, OrdersHostingDeleteView,
+ MarkAsReadNotificationView, PasswordResetView, PasswordResetConfirmView,
+ HostingPricingView, CreateVirtualMachinesView, HostingBillListView,
+ HostingBillDetailView, SSHKeyDeleteView, SSHKeyCreateView, SSHKeyListView,
+ SSHKeyChoiceView, DashboardView)
urlpatterns = [
url(r'index/?$', IndexView.as_view(), name='index'),
url(r'django/?$', DjangoHostingView.as_view(), name='djangohosting'),
+ url(r'dashboard/?$', DashboardView.as_view(), name='dashboard'),
url(r'nodejs/?$', NodeJSHostingView.as_view(), name='nodejshosting'),
url(r'rails/?$', RailsHostingView.as_view(), name='railshosting'),
url(r'pricing/?$', HostingPricingView.as_view(), name='pricing'),
diff --git a/hosting/views.py b/hosting/views.py
index 0747f134..08f0862e 100644
--- a/hosting/views.py
+++ b/hosting/views.py
@@ -40,6 +40,18 @@ CONNECTION_ERROR = "Your VMs cannot be displayed at the moment due to a backend
connection error. please try again in a few minutes."
+class DashboardView(View):
+ template_name = "hosting/dashboard.html"
+
+ def get_context_data(self, **kwargs):
+ context = {}
+ return context
+
+ def get(self, request, *args, **kwargs):
+ context = self.get_context_data()
+ return render(request, self.template_name, context)
+
+
class DjangoHostingView(ProcessVMSelectionMixin, View):
template_name = "hosting/django.html"
@@ -558,7 +570,8 @@ class PaymentVMView(LoginRequiredMixin, FormView):
token=token)
if not customer:
msg = _("Invalid credit card")
- messages.add_message(self.request, messages.ERROR, msg, extra_tags='make_charge_error')
+ messages.add_message(
+ self.request, messages.ERROR, msg, extra_tags='make_charge_error')
return HttpResponseRedirect(reverse('hosting:payment') + '#payment_error')
# Create Billing Address
@@ -572,7 +585,8 @@ class PaymentVMView(LoginRequiredMixin, FormView):
# Check if the payment was approved
if not charge_response.get('response_object'):
msg = charge_response.get('error')
- messages.add_message(self.request, messages.ERROR, msg, extra_tags='make_charge_error')
+ messages.add_message(
+ self.request, messages.ERROR, msg, extra_tags='make_charge_error')
return HttpResponseRedirect(reverse('hosting:payment') + '#payment_error')
charge = charge_response.get('response_object')