Fix kaehmy styles and templates

This commit is contained in:
Jan Tuomi
2018-01-28 16:56:51 +02:00
parent 77330dffe9
commit 7dc9fac597
8 changed files with 3272 additions and 1875 deletions
+6 -3
View File
@@ -14,7 +14,8 @@ from dealer.git import git
from members.views.utils import *
from kaehmy.models import Application, CustomRole, PresetRole
from kaehmy.forms import ApplicationForm
from kaehmy.forms import ApplicationForm, CommentForm
from webapp.utils import send_email
@ensure_csrf_cookie
@@ -42,6 +43,9 @@ def list_view(request, *args, **kwargs):
'application_count': len(applications),
'filter_options': filter_options
}
print(applications[0])
return render(request, 'list.html', context)
@@ -50,7 +54,7 @@ def list_view(request, *args, **kwargs):
def comment(request, *args, **kwargs):
"""POST endpoint for commenting"""
form = KaehmyCommentForm(request.POST)
form = CommentForm(request.POST)
if form.is_valid():
comment = form.save()
email = comment.parent.email
@@ -66,7 +70,6 @@ def comment(request, *args, **kwargs):
return redirect('/kaehmy')
else:
print(form)
context = {
'error': form.errors
}