Fix most of html templates
This commit is contained in:
@@ -41,7 +41,7 @@ def application_list(request, *args, **kwargs):
|
||||
"application_count": application_count,
|
||||
"notification": request.GET.get("notification", None),
|
||||
}
|
||||
return render(request, "application_list.html", context)
|
||||
return render(request, "members/application_list.html", context)
|
||||
|
||||
|
||||
@ensure_csrf_cookie
|
||||
@@ -57,7 +57,9 @@ def application_edit(request, *args, **kwargs):
|
||||
application = Request.objects.get(id=i)
|
||||
form = ApplicationForm(instance=application)
|
||||
return render(
|
||||
request, "application_edit.html", {"application_id": i, "form": form}
|
||||
request,
|
||||
"members/application_edit.html",
|
||||
{"application_id": i, "form": form},
|
||||
)
|
||||
|
||||
|
||||
@@ -101,7 +103,7 @@ def application_accept(request, *args, **kwargs):
|
||||
subject = _("Jäsenhakemuksesi Sähköinsinöörikiltaan on hyväksytty!")
|
||||
|
||||
message = render_to_string(
|
||||
"email_application_accept.html",
|
||||
"members/email_application_accept.html",
|
||||
{"first_name": application.first_name},
|
||||
)
|
||||
send_email(member.email, subject, message, True)
|
||||
@@ -158,7 +160,7 @@ def application_delete_confirm(request, *args, **kwargs):
|
||||
form = ApplicationForm(instance=application)
|
||||
return render(
|
||||
request,
|
||||
"application_delete_confirm.html",
|
||||
"members/application_delete_confirm.html",
|
||||
{"application_id": i, "form": form},
|
||||
)
|
||||
|
||||
@@ -167,7 +169,7 @@ def application_delete_confirm(request, *args, **kwargs):
|
||||
def application_form(request, *args, **kwargs):
|
||||
"""Render member application form."""
|
||||
form = ApplicationForm()
|
||||
return render(request, "application_index.html", {"form": form})
|
||||
return render(request, "members/application_index.html", {"form": form})
|
||||
|
||||
|
||||
@ensure_csrf_cookie
|
||||
@@ -186,7 +188,7 @@ def application_submit(request, *args, **kwargs):
|
||||
)
|
||||
|
||||
message = render_to_string(
|
||||
"email_application_submit.html",
|
||||
"members/email_application_submit.html",
|
||||
{
|
||||
"application": application,
|
||||
"ayy": _("Kyllä") if application.AYY else _("Ei"),
|
||||
@@ -195,6 +197,6 @@ def application_submit(request, *args, **kwargs):
|
||||
)
|
||||
send_email(email, subject, message)
|
||||
finally:
|
||||
return render(request, "application_success.html", {})
|
||||
return render(request, "members/application_success.html", {})
|
||||
else:
|
||||
return error_view(request, form.errors)
|
||||
|
||||
Reference in New Issue
Block a user