Fix kaehmy styles and templates
This commit is contained in:
+6
-3
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user