diff --git a/datacenterlight/templates/datacenterlight/includes/_footer.html b/datacenterlight/templates/datacenterlight/includes/_footer.html
index 7d27eaef..c4950807 100644
--- a/datacenterlight/templates/datacenterlight/includes/_footer.html
+++ b/datacenterlight/templates/datacenterlight/includes/_footer.html
@@ -4,15 +4,15 @@
diff --git a/datacenterlight/urls.py b/datacenterlight/urls.py
index af8e76f2..006e7fc3 100644
--- a/datacenterlight/urls.py
+++ b/datacenterlight/urls.py
@@ -13,7 +13,7 @@ urlpatterns = [
url(r'^g/$', IndexView.as_view(), name='index_g'),
url(r'^f/$', IndexView.as_view(), name='index_f'),
url(r'^l/$', IndexView.as_view(), name='index_l'),
- url(r'^new/$', RedirectView.as_view(url='/cms/datacenterlight/'),
+ url(r'^new/$', RedirectView.as_view(url='/cms/'),
name='cms_index'),
url(r'^whydatacenterlight/?$', WhyDataCenterLightView.as_view(),
name='whydatacenterlight'),
diff --git a/hosting/mixins.py b/hosting/mixins.py
index 666cbcbe..5fb83383 100644
--- a/hosting/mixins.py
+++ b/hosting/mixins.py
@@ -1,4 +1,5 @@
from django.shortcuts import redirect
+from django.conf import settings
from django.core.urlresolvers import reverse
from opennebula_api.serializers import VirtualMachineTemplateSerializer
@@ -24,3 +25,10 @@ class ProcessVMSelectionMixin(object):
request.session['next'] = reverse('hosting:payment')
return redirect(reverse('hosting:login'))
return redirect(reverse('hosting:payment'))
+
+
+class HostingContextMixin(object):
+ def get_context_data(self, **kwargs):
+ context = super().get_context_data(**kwargs)
+ context['MULTISITE_CMS_FALLBACK'] = settings.MULTISITE_CMS_FALLBACK
+ return context
diff --git a/hosting/views.py b/hosting/views.py
index 8e7380fb..6e143760 100644
--- a/hosting/views.py
+++ b/hosting/views.py
@@ -54,7 +54,7 @@ from .forms import (
HostingUserSignupForm, HostingUserLoginForm, UserHostingKeyForm,
generate_ssh_key_name
)
-from .mixins import ProcessVMSelectionMixin
+from .mixins import ProcessVMSelectionMixin, HostingContextMixin
from .models import (
HostingOrder, HostingBill, HostingPlan, UserHostingKey, VMDetail
)
@@ -213,13 +213,13 @@ class IndexView(View):
return render(request, self.template_name, context)
-class LoginView(LoginViewMixin):
+class LoginView(HostingContextMixin, LoginViewMixin):
template_name = "hosting/login.html"
form_class = HostingUserLoginForm
success_url = reverse_lazy('hosting:dashboard')
-class SignupView(CreateView):
+class SignupView(HostingContextMixin, CreateView):
template_name = 'hosting/signup.html'
form_class = HostingUserSignupForm
model = CustomUser
@@ -248,7 +248,7 @@ class SignupView(CreateView):
return super(SignupView, self).get(request, *args, **kwargs)
-class SignupValidateView(TemplateView):
+class SignupValidateView(HostingContextMixin, TemplateView):
template_name = "hosting/signup_validate.html"
def get_context_data(self, **kwargs):
@@ -272,7 +272,7 @@ class SignupValidateView(TemplateView):
return context
-class SignupValidatedView(SignupValidateView):
+class SignupValidatedView(SignupValidateView, HostingContextMixin):
template_name = "hosting/signup_validate.html"
def get_context_data(self, **kwargs):
@@ -307,7 +307,7 @@ class SignupValidatedView(SignupValidateView):
email.send()
else:
home_url = '
Data Center Light'
message = '{sorry_message}
{go_back_to} {hurl}'.format(
sorry_message=_("Sorry. Your request is invalid."),
@@ -325,7 +325,8 @@ class SignupValidatedView(SignupValidateView):
return super(SignupValidatedView, self).get(request, *args, **kwargs)
-class ResendActivationEmailView(ResendActivationLinkViewMixin):
+class ResendActivationEmailView(HostingContextMixin,
+ ResendActivationLinkViewMixin):
template_name = 'hosting/resend_activation_link.html'
form_class = ResendActivationEmailForm
success_url = reverse_lazy('hosting:login')
@@ -333,7 +334,7 @@ class ResendActivationEmailView(ResendActivationLinkViewMixin):
email_template_name = 'user_activation'
-class PasswordResetView(PasswordResetViewMixin):
+class PasswordResetView(HostingContextMixin, PasswordResetViewMixin):
site = 'dcl'
template_name = 'hosting/reset_password.html'
form_class = PasswordResetRequestForm
@@ -341,7 +342,8 @@ class PasswordResetView(PasswordResetViewMixin):
template_email_path = 'hosting/emails/'
-class PasswordResetConfirmView(PasswordResetConfirmViewMixin):
+class PasswordResetConfirmView(HostingContextMixin,
+ PasswordResetConfirmViewMixin):
template_name = 'hosting/confirm_reset_password.html'
success_url = reverse_lazy('hosting:login')