fixed some index datacenterlight issues
This commit is contained in:
parent
db13e642fc
commit
ed28fc411e
2 changed files with 7 additions and 1 deletions
|
@ -91,7 +91,7 @@
|
||||||
<a href="#how" class="btn btn-default btn-lg"><i class="#Services"></i> <span class="network-name">What is it?</span></a>
|
<a href="#how" class="btn btn-default btn-lg"><i class="#Services"></i> <span class="network-name">What is it?</span></a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="#own" class="btn btn-default btn-lg page-scroll"><span class="network-name">I want it!</span></a>
|
<a href="#requestform" class="btn btn-default btn-lg page-scroll"><span class="network-name">I want it!</span></a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -2,6 +2,7 @@ from django.views.generic import FormView, CreateView
|
||||||
from .forms import BetaAccessForm
|
from .forms import BetaAccessForm
|
||||||
from .models import BetaAccess
|
from .models import BetaAccess
|
||||||
from django.contrib import messages
|
from django.contrib import messages
|
||||||
|
from django.core.urlresolvers import reverse_lazy, reverse
|
||||||
|
|
||||||
|
|
||||||
class IndexView(CreateView):
|
class IndexView(CreateView):
|
||||||
|
@ -11,6 +12,11 @@ class IndexView(CreateView):
|
||||||
success_url = "/datacenterlight#requestform"
|
success_url = "/datacenterlight#requestform"
|
||||||
success_message = "Thank you, we will contact you as soon as possible"
|
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):
|
def form_valid(self, form):
|
||||||
messages.add_message(self.request, messages.SUCCESS, self.success_message)
|
messages.add_message(self.request, messages.SUCCESS, self.success_message)
|
||||||
return super(IndexView, self).form_valid(form)
|
return super(IndexView, self).form_valid(form)
|
||||||
|
|
Loading…
Reference in a new issue