Added Flake8 lib and fixed PEP8 violations
This commit is contained in:
parent
0cbd3aa666
commit
edcfd3e9f4
65 changed files with 340 additions and 387 deletions
|
|
@ -4,11 +4,11 @@ from django.utils.translation import get_language, get_language_info
|
|||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.views.generic.edit import FormView
|
||||
from django.contrib import messages
|
||||
from django.core.urlresolvers import reverse_lazy, reverse
|
||||
from django.shortcuts import render
|
||||
|
||||
from utils.forms import ContactUsForm
|
||||
|
||||
|
||||
class IndexView(TemplateView):
|
||||
template_name = "alplora/index.html"
|
||||
|
||||
|
|
@ -18,6 +18,7 @@ class IndexView(TemplateView):
|
|||
context.update(languages)
|
||||
return context
|
||||
|
||||
|
||||
class ContactView(FormView):
|
||||
template_name = 'alplora/contact.html'
|
||||
form_class = ContactUsForm
|
||||
|
|
@ -33,7 +34,8 @@ class ContactView(FormView):
|
|||
form.save()
|
||||
form.send_email(email_to='info@alplora.ch')
|
||||
messages.add_message(self.request, messages.SUCCESS, self.success_message)
|
||||
return render(self.request, 'alplora/contact_success.html', {})
|
||||
return render(self.request, 'alplora/contact_success.html', {})
|
||||
|
||||
|
||||
class LoginView(TemplateView):
|
||||
template_name = "alplora/login.html"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue