Handled success message from contact form in ungleich, Contact section in ungleich now supports translation, About section in ungleich now supports translation, Footer section in ungleich now supports translation, Portfolio section in ungleich now supports translation, Services section in ungleich now supports translation, Software section in ungleich now supports translation, Fixed digitalglarus about page
This commit is contained in:
parent
488bb76c76
commit
d2238106e8
16 changed files with 590 additions and 245 deletions
|
|
@ -3,18 +3,25 @@ from django.contrib import messages
|
|||
from django.views.generic.edit import FormView
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.core.urlresolvers import reverse_lazy
|
||||
from django.views.generic import TemplateView
|
||||
from django.views.generic import View
|
||||
from django.shortcuts import render
|
||||
|
||||
from utils.forms import ContactUsForm
|
||||
|
||||
|
||||
class LandingView(TemplateView):
|
||||
class LandingView(View):
|
||||
template_name = "ungleich_page/landing.html"
|
||||
form_class = ContactUsForm
|
||||
|
||||
def get(self, request, *args, **kwargs):
|
||||
form = self.form_class()
|
||||
return render(request, self.template_name, {'form': form})
|
||||
|
||||
|
||||
class ContactView(FormView):
|
||||
template_name = 'ungleich_page/contact.html'
|
||||
template_name = 'ungleich_page/landing.html'
|
||||
form_class = ContactUsForm
|
||||
success_url = reverse_lazy('digitalglarus:contact')
|
||||
success_url = reverse_lazy('ungleich_page:landing')
|
||||
success_message = _('Message Successfully Sent')
|
||||
|
||||
def form_valid(self, form):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue