From ed28fc411ecfe6fb1267470bb45d7979cd713ee7 Mon Sep 17 00:00:00 2001 From: Levi Date: Wed, 21 Dec 2016 01:24:04 -0500 Subject: [PATCH] fixed some index datacenterlight issues --- datacenterlight/templates/datacenterlight/index.html | 2 +- datacenterlight/views.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/datacenterlight/templates/datacenterlight/index.html b/datacenterlight/templates/datacenterlight/index.html index a5bff0cb..f61b6b17 100755 --- a/datacenterlight/templates/datacenterlight/index.html +++ b/datacenterlight/templates/datacenterlight/index.html @@ -91,7 +91,7 @@ What is it?
  • - I want it! + I want it!
  • diff --git a/datacenterlight/views.py b/datacenterlight/views.py index 2f24fe63..a70e75d5 100644 --- a/datacenterlight/views.py +++ b/datacenterlight/views.py @@ -2,6 +2,7 @@ from django.views.generic import FormView, CreateView from .forms import BetaAccessForm from .models import BetaAccess from django.contrib import messages +from django.core.urlresolvers import reverse_lazy, reverse class IndexView(CreateView): @@ -11,6 +12,11 @@ class IndexView(CreateView): success_url = "/datacenterlight#requestform" success_message = "Thank you, we will contact you as soon as possible" + def get_success_url(self): + success_url = reverse('datacenterlight:index') + success_url += "#requestform" + return success_url + def form_valid(self, form): messages.add_message(self.request, messages.SUCCESS, self.success_message) return super(IndexView, self).form_valid(form)