From f51d71e0450da116e15a1ab2fe7390202dca6222 Mon Sep 17 00:00:00 2001 From: Aarni Halinen Date: Wed, 3 Aug 2022 22:46:14 +0300 Subject: [PATCH] Fix most of html templates --- infoscreen/views/admin_views.py | 2 +- infoscreen/views/public_views.py | 2 +- kaehmy/forms.py | 2 +- kaehmy/views.py | 12 ++++++------ members/views/applications.py | 16 +++++++++------- members/views/members.py | 14 +++++++++----- members/views/payments.py | 12 ++++++++---- members/views/utils.py | 6 +++--- ohlhafv/views.py | 8 ++++---- templates/error.html | 2 +- .../templates => templates/infoscreen}/base.html | 0 .../infoscreen}/header.html | 0 .../infoscreen}/infoscreen_admin.html | 12 ++++++------ .../infoscreen}/infoscreen_index.html | 2 +- .../templates => templates/infoscreen}/nav.html | 0 .../infoscreen}/tabs/add_remove.html | 0 .../infoscreen}/tabs/rotations.html | 0 .../infoscreen}/tabs/slides.html | 0 {kaehmy/templates => templates/kaehmy}/base.html | 6 +++--- .../kaehmy}/checkbox_option.html | 0 .../templates => templates/kaehmy}/error.html | 2 +- .../templates => templates/kaehmy}/export.html | 0 .../templates => templates/kaehmy}/footer.html | 0 .../templates => templates/kaehmy}/header.html | 0 .../templates => templates/kaehmy}/kaehmy.html | 4 ++-- {kaehmy/templates => templates/kaehmy}/list.html | 6 +++--- .../templates => templates/kaehmy}/message.html | 2 +- .../kaehmy}/navigation.html | 0 .../kaehmy}/statistics.html | 4 ++-- .../members}/application_delete_confirm.html | 2 +- .../members}/application_edit.html | 2 +- .../members}/application_form_base.html | 2 +- .../members}/application_index.html | 2 +- .../members}/application_list.html | 2 +- .../members}/application_success.html | 2 +- .../templates => templates/members}/base.html | 2 +- .../members}/email_application_accept.html | 0 .../members}/email_application_submit.html | 0 .../members}/member_add.html | 2 +- .../members}/member_add_many.html | 2 +- .../members}/member_add_many_confirm.html | 2 +- .../members}/member_delete_confirm.html | 2 +- .../members}/member_edit.html | 2 +- .../members}/member_list.html | 2 +- .../members}/payment_add.html | 2 +- .../members}/payment_delete_confirm.html | 2 +- .../members}/payment_edit.html | 2 +- .../members}/payment_list.html | 2 +- .../members}/settings.html | 0 .../members}/upload_form.html | 2 +- .../templates => templates/ohlhafv}/base.html | 6 +++--- .../templates => templates/ohlhafv}/email.html | 0 .../templates => templates/ohlhafv}/footer.html | 0 .../templates => templates/ohlhafv}/header.html | 0 .../templates => templates/ohlhafv}/list.html | 2 +- .../ohlhafv}/navigation.html | 0 .../templates => templates/ohlhafv}/new.html | 4 ++-- .../templates => templates/ohlhafv}/tgmsg.tpl | 0 {webapp/templates => templates/webapp}/base.html | 6 +++--- .../templates => templates/webapp}/contact.html | 2 +- .../webapp}/event_calendar.html | 2 +- .../templates => templates/webapp}/footer.html | 0 .../templates => templates/webapp}/freshmen.html | 2 +- .../templates => templates/webapp}/guild.html | 2 +- .../templates => templates/webapp}/header.html | 0 .../templates => templates/webapp}/index.html | 2 +- .../webapp}/international.html | 2 +- {webapp/templates => templates/webapp}/jobs.html | 2 +- .../webapp}/navigation.html | 0 .../webapp}/signup_email.html | 0 .../templates => templates/webapp}/sosso.html | 2 +- .../webapp}/tg_message.tpl | 0 webapp/utils.py | 2 +- 73 files changed, 98 insertions(+), 88 deletions(-) rename {infoscreen/templates => templates/infoscreen}/base.html (100%) rename {infoscreen/templates => templates/infoscreen}/header.html (100%) rename {infoscreen/templates => templates/infoscreen}/infoscreen_admin.html (75%) rename {infoscreen/templates => templates/infoscreen}/infoscreen_index.html (95%) rename {infoscreen/templates => templates/infoscreen}/nav.html (100%) rename {infoscreen/templates => templates/infoscreen}/tabs/add_remove.html (100%) rename {infoscreen/templates => templates/infoscreen}/tabs/rotations.html (100%) rename {infoscreen/templates => templates/infoscreen}/tabs/slides.html (100%) rename {kaehmy/templates => templates/kaehmy}/base.html (84%) rename {kaehmy/templates => templates/kaehmy}/checkbox_option.html (100%) rename {kaehmy/templates => templates/kaehmy}/error.html (91%) rename {kaehmy/templates => templates/kaehmy}/export.html (100%) rename {kaehmy/templates => templates/kaehmy}/footer.html (100%) rename {kaehmy/templates => templates/kaehmy}/header.html (100%) rename {kaehmy/templates => templates/kaehmy}/kaehmy.html (98%) rename {kaehmy/templates => templates/kaehmy}/list.html (96%) rename {kaehmy/templates => templates/kaehmy}/message.html (89%) rename {kaehmy/templates => templates/kaehmy}/navigation.html (100%) rename {kaehmy/templates => templates/kaehmy}/statistics.html (90%) rename {members/templates => templates/members}/application_delete_confirm.html (94%) rename {members/templates => templates/members}/application_edit.html (95%) rename {members/templates => templates/members}/application_form_base.html (98%) rename {members/templates => templates/members}/application_index.html (92%) rename {members/templates => templates/members}/application_list.html (92%) rename {members/templates => templates/members}/application_success.html (90%) rename {members/templates => templates/members}/base.html (99%) rename {members/templates => templates/members}/email_application_accept.html (100%) rename {members/templates => templates/members}/email_application_submit.html (100%) rename {members/templates => templates/members}/member_add.html (93%) rename {members/templates => templates/members}/member_add_many.html (98%) rename {members/templates => templates/members}/member_add_many_confirm.html (94%) rename {members/templates => templates/members}/member_delete_confirm.html (94%) rename {members/templates => templates/members}/member_edit.html (95%) rename {members/templates => templates/members}/member_list.html (96%) rename {members/templates => templates/members}/payment_add.html (95%) rename {members/templates => templates/members}/payment_delete_confirm.html (94%) rename {members/templates => templates/members}/payment_edit.html (95%) rename {members/templates => templates/members}/payment_list.html (96%) rename {members/templates => templates/members}/settings.html (100%) rename {members/templates => templates/members}/upload_form.html (87%) rename {ohlhafv/templates => templates/ohlhafv}/base.html (80%) rename {ohlhafv/templates => templates/ohlhafv}/email.html (100%) rename {ohlhafv/templates => templates/ohlhafv}/footer.html (100%) rename {ohlhafv/templates => templates/ohlhafv}/header.html (100%) rename {ohlhafv/templates => templates/ohlhafv}/list.html (94%) rename {ohlhafv/templates => templates/ohlhafv}/navigation.html (100%) rename {ohlhafv/templates => templates/ohlhafv}/new.html (87%) rename {ohlhafv/templates => templates/ohlhafv}/tgmsg.tpl (100%) rename {webapp/templates => templates/webapp}/base.html (84%) rename {webapp/templates => templates/webapp}/contact.html (97%) rename {webapp/templates => templates/webapp}/event_calendar.html (89%) rename {webapp/templates => templates/webapp}/footer.html (100%) rename {webapp/templates => templates/webapp}/freshmen.html (88%) rename {webapp/templates => templates/webapp}/guild.html (88%) rename {webapp/templates => templates/webapp}/header.html (100%) rename {webapp/templates => templates/webapp}/index.html (97%) rename {webapp/templates => templates/webapp}/international.html (89%) rename {webapp/templates => templates/webapp}/jobs.html (88%) rename {webapp/templates => templates/webapp}/navigation.html (100%) rename {webapp/templates => templates/webapp}/signup_email.html (100%) rename {webapp/templates => templates/webapp}/sosso.html (88%) rename {webapp/templates => templates/webapp}/tg_message.tpl (100%) diff --git a/infoscreen/views/admin_views.py b/infoscreen/views/admin_views.py index f251442..19283e4 100644 --- a/infoscreen/views/admin_views.py +++ b/infoscreen/views/admin_views.py @@ -36,7 +36,7 @@ from infoscreen.models import ( @permission_required("infoscreen.change_infoinstance", raise_exception=True) def admin(request, *args, **kwargs): """Render infoscreen admin page.""" - return render(request, "infoscreen:infoscreen_admin.html", {}) + return render(request, "infoscreen/infoscreen_admin.html", {}) def create_item_generator(model): diff --git a/infoscreen/views/public_views.py b/infoscreen/views/public_views.py index 978543c..665f7e1 100644 --- a/infoscreen/views/public_views.py +++ b/infoscreen/views/public_views.py @@ -15,7 +15,7 @@ import requests @require_http_methods(["GET"]) def index(request, idx, *args, **kwargs): """Render infoscreen index page.""" - return render(request, "infoscreen_index.html", {"rotation": idx}) + return render(request, "infoscreen/infoscreen_index.html", {"rotation": idx}) @require_http_methods(["GET"]) diff --git a/kaehmy/forms.py b/kaehmy/forms.py index 8190251..c82b549 100644 --- a/kaehmy/forms.py +++ b/kaehmy/forms.py @@ -6,7 +6,7 @@ from kaehmy.models import PresetRole, CustomRole, Application, Comment, KaehmyBa class CheckboxSelectMultiple(forms.widgets.CheckboxSelectMultiple): - option_template_name = "checkbox_option.html" + option_template_name = "kaehmy/checkbox_option.html" def create_option( self, name, value, label, selected, index, subindex=None, attrs=None diff --git a/kaehmy/views.py b/kaehmy/views.py index cc00cc7..92f151d 100644 --- a/kaehmy/views.py +++ b/kaehmy/views.py @@ -52,7 +52,7 @@ def list_view(request, *args, **kwargs): "filter_options": filter_options, } - return render(request, "kaehmy:list.html", context) + return render(request, "kaehmy/kaehmy_list.html", context) @ensure_csrf_cookie @@ -77,7 +77,7 @@ def comment(request, *args, **kwargs): return redirect("/kaehmy") else: context = {"error": form.errors} - return render(request, "kaehmy:error.html", context) + return render(request, "kaehmy/kaehmy_error.html", context) @require_http_methods(["GET"]) @@ -102,14 +102,14 @@ def statistics_view(request, *args, **kwargs): "application_count": len(applications), "role_list": role_list, } - return render(request, "kaehmy:statistics.html", context) + return render(request, "kaehmy/statistics.html", context) @require_http_methods(["GET"]) def view(request, *args, **kwargs): """Render Kaehmy form page.""" form = ApplicationForm() - return render(request, "kaehmy:kaehmy.html", {"form": form}) + return render(request, "kaehmy/kaehmy.html", {"form": form}) @ensure_csrf_cookie @@ -144,7 +144,7 @@ def submit(request, *args, **kwargs): processHooks(message=f"Uusi New kaehmy! {name} -> {url}", eventType="kaehmy") else: context = {"error": form.errors} - return render(request, "kaehmy:error.html", context) + return render(request, "kaehmy/error.html", context) return HttpResponseRedirect("/kaehmy") @@ -171,4 +171,4 @@ def export_view(request, *args, **kwargs): "non_board_table": make_table(non_board), "board_table": make_table(board), } - return render(request, "kaehmy:export.html", context) + return render(request, "kaehmy/export.html", context) diff --git a/members/views/applications.py b/members/views/applications.py index 4376d50..a7a0220 100644 --- a/members/views/applications.py +++ b/members/views/applications.py @@ -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) diff --git a/members/views/members.py b/members/views/members.py index 0efdee7..2717afa 100644 --- a/members/views/members.py +++ b/members/views/members.py @@ -70,7 +70,7 @@ def member_list(request, *args, **kwargs): "paid_count": len(queryset.filter(last_paid__gte=filter_date)), "notification": request.GET.get("notification", None), } - return render(request, "member_list.html", context) + return render(request, "members/member_list.html", context) @ensure_csrf_cookie @@ -80,7 +80,7 @@ def member_list(request, *args, **kwargs): def member_add(request, *args, **kwargs): """Render add member page.""" form = MemberForm() - return render(request, "member_add.html", {"form": form}) + return render(request, "members/member_add.html", {"form": form}) @ensure_csrf_cookie @@ -96,7 +96,9 @@ def member_delete_confirm(request, *args, **kwargs): member = Member.objects.get(id=i) form = MemberForm(instance=member) return render( - request, "member_delete_confirm.html", {"member_id": i, "form": form} + request, + "members/member_delete_confirm.html", + {"member_id": i, "form": form}, ) @@ -106,7 +108,7 @@ def member_delete_confirm(request, *args, **kwargs): @permission_required("members.add_member", raise_exception=True) def member_add_many(request, *args, **kwargs): """Render add multiple members page.""" - return render(request, "member_add_many.html", {}) + return render(request, "members/member_add_many.html", {}) @ensure_csrf_cookie @@ -233,7 +235,9 @@ def member_edit(request, *args, **kwargs): else: member = Member.objects.get(id=i) form = MemberForm(instance=member) - return render(request, "member_edit.html", {"member_id": i, "form": form}) + return render( + request, "members/member_edit.html", {"member_id": i, "form": form} + ) @method_decorator(login_required(login_url="/admin/login"), name="dispatch") diff --git a/members/views/payments.py b/members/views/payments.py index 5511129..1912260 100644 --- a/members/views/payments.py +++ b/members/views/payments.py @@ -43,7 +43,7 @@ def payment_list(request, *args, **kwargs): "payment_count": len(payments), "notification": request.GET.get("notification", None), } - return render(request, "payment_list.html", context) + return render(request, "members/payment_list.html", context) @ensure_csrf_cookie @@ -53,7 +53,7 @@ def payment_list(request, *args, **kwargs): def payment_add(request, *args, **kwargs): """Render add payment form.""" form = PaymentForm() - return render(request, "payment_add.html", {"form": form}) + return render(request, "members/payment_add.html", {"form": form}) @ensure_csrf_cookie @@ -92,7 +92,9 @@ def payment_edit(request, *args, **kwargs): else: payment = Payment.objects.get(id=i) form = PaymentForm(instance=payment) - return render(request, "payment_edit.html", {"payment_id": i, "form": form}) + return render( + request, "members/payment_edit.html", {"payment_id": i, "form": form} + ) @ensure_csrf_cookie @@ -108,7 +110,9 @@ def payment_delete_confirm(request, *args, **kwargs): payment = Payment.objects.get(id=i) form = PaymentForm(instance=payment) return render( - request, "payment_delete_confirm.html", {"payment_id": i, "form": form} + request, + "members/payment_delete_confirm.html", + {"payment_id": i, "form": form}, ) diff --git a/members/views/utils.py b/members/views/utils.py index 36bf60c..2adfe87 100644 --- a/members/views/utils.py +++ b/members/views/utils.py @@ -46,7 +46,7 @@ class MemberDetail(generics.RetrieveAPIView): def error_view(request, message, status=400): - return render(request, "error.html", {"error": message}, status=400) + return render(request, "members/error.html", {"error": message}, status=400) def validate_recaptcha(response): @@ -100,7 +100,7 @@ def convert_table_to_html(table, request): @permission_required("members.change_member", raise_exception=True) def settings_page(request, *args, **kwargs): """Render member app settings page.""" - return render(request, "settings.html", {}) + return render(request, "members/settings.html", {}) @ensure_csrf_cookie @@ -155,7 +155,7 @@ def import_csv(request, *args, **kwargs): request.session["models"] = result request.session["payment_source"] = payment_source context = {"members": member_table_html, "payments": payment_table_html} - return render(request, "member_add_many_confirm.html", context) + return render(request, "members/member_add_many_confirm.html", context) def make_excel_response(Resource): diff --git a/ohlhafv/views.py b/ohlhafv/views.py index f9d3c3b..f6bc7f9 100644 --- a/ohlhafv/views.py +++ b/ohlhafv/views.py @@ -18,7 +18,7 @@ from webapp.models import processHooks def ohlhafv_view(request, *args, **kwargs): """Render Ohlhafv form page.""" form = OhlhafvForm() - return render(request, "ohlhafv:new.html", {"form": form}) + return render(request, "ohlhafv/new.html", {"form": form}) @ensure_csrf_cookie @@ -32,7 +32,7 @@ def ohlhafv_submit(request, *args, **kwargs): url = f"https://{URL}/ohlhafv/list" email_body = render_to_string( - "ohlhafv:email.html", + "ohlhafv/email.html", { "challenge": challenge, "url": url, @@ -46,7 +46,7 @@ def ohlhafv_submit(request, *args, **kwargs): try: webhook_message = render_to_string( - "ohlhafv:tgmsg.tpl", {"challenge": challenge, "url": url} + "ohlhafv/tgmsg.tpl", {"challenge": challenge, "url": url} ) processHooks(message=webhook_message, eventType="ohlhafv") except Exception: @@ -67,4 +67,4 @@ def ohlhafv_list(request, *args, **kwargs): "challenges": challenges, "challenge_count": len(challenges), } - return render(request, "ohlhafv:list.html", context) + return render(request, "ohlhafv/list.html", context) diff --git a/templates/error.html b/templates/error.html index 25c4b1b..909b93a 100644 --- a/templates/error.html +++ b/templates/error.html @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "members/base.html" %} {% load static %} {% load i18n %} diff --git a/infoscreen/templates/base.html b/templates/infoscreen/base.html similarity index 100% rename from infoscreen/templates/base.html rename to templates/infoscreen/base.html diff --git a/infoscreen/templates/header.html b/templates/infoscreen/header.html similarity index 100% rename from infoscreen/templates/header.html rename to templates/infoscreen/header.html diff --git a/infoscreen/templates/infoscreen_admin.html b/templates/infoscreen/infoscreen_admin.html similarity index 75% rename from infoscreen/templates/infoscreen_admin.html rename to templates/infoscreen/infoscreen_admin.html index 4db11d0..958669c 100644 --- a/infoscreen/templates/infoscreen_admin.html +++ b/templates/infoscreen/infoscreen_admin.html @@ -1,4 +1,4 @@ -{% extends "infoscreen:base.html" %} +{% extends "infoscreen/base.html" %} {% load i18n %} {% load static %} @@ -32,13 +32,13 @@

{% trans "Infoscreen Admin Pane" %}

- {% include "infoscreen:nav.html" %} + {% include "infoscreen/nav.html" %}
- {% include "infoscreen:tabs/slides.html" %} - {% include "infoscreen:tabs/rotations.html" %} - {% include "infoscreen:tabs/add_remove.html" %} + {% include "infoscreen/tabs/slides.html" %} + {% include "infoscreen/tabs/rotations.html" %} + {% include "infoscreen/tabs/add_remove.html" %}
-{% include "footer.html" %} +{% include "webapp/footer.html" %} {% endblock body %} \ No newline at end of file diff --git a/infoscreen/templates/infoscreen_index.html b/templates/infoscreen/infoscreen_index.html similarity index 95% rename from infoscreen/templates/infoscreen_index.html rename to templates/infoscreen/infoscreen_index.html index a07df50..1269292 100644 --- a/infoscreen/templates/infoscreen_index.html +++ b/templates/infoscreen/infoscreen_index.html @@ -1,4 +1,4 @@ -{% extends "infoscreen:base.html" %} +{% extends "infoscreen/base.html" %} {% load static %} {% load i18n %} diff --git a/infoscreen/templates/nav.html b/templates/infoscreen/nav.html similarity index 100% rename from infoscreen/templates/nav.html rename to templates/infoscreen/nav.html diff --git a/infoscreen/templates/tabs/add_remove.html b/templates/infoscreen/tabs/add_remove.html similarity index 100% rename from infoscreen/templates/tabs/add_remove.html rename to templates/infoscreen/tabs/add_remove.html diff --git a/infoscreen/templates/tabs/rotations.html b/templates/infoscreen/tabs/rotations.html similarity index 100% rename from infoscreen/templates/tabs/rotations.html rename to templates/infoscreen/tabs/rotations.html diff --git a/infoscreen/templates/tabs/slides.html b/templates/infoscreen/tabs/slides.html similarity index 100% rename from infoscreen/templates/tabs/slides.html rename to templates/infoscreen/tabs/slides.html diff --git a/kaehmy/templates/base.html b/templates/kaehmy/base.html similarity index 84% rename from kaehmy/templates/base.html rename to templates/kaehmy/base.html index 06e360b..f99b3de 100644 --- a/kaehmy/templates/base.html +++ b/templates/kaehmy/base.html @@ -14,12 +14,12 @@ {% block header %}
- {% include "kaehmy:header.html" %} + {% include "kaehmy/header.html" %}
{% endblock header %} {% block navigation %} - {% include "kaehmy:navigation.html" %} + {% include "kaehmy/navigation.html" %} {% endblock %}
@@ -28,7 +28,7 @@
diff --git a/kaehmy/templates/checkbox_option.html b/templates/kaehmy/checkbox_option.html similarity index 100% rename from kaehmy/templates/checkbox_option.html rename to templates/kaehmy/checkbox_option.html diff --git a/kaehmy/templates/error.html b/templates/kaehmy/error.html similarity index 91% rename from kaehmy/templates/error.html rename to templates/kaehmy/error.html index d08acd4..b8a849a 100644 --- a/kaehmy/templates/error.html +++ b/templates/kaehmy/error.html @@ -1,4 +1,4 @@ -{% extends "kaehmy:base.html" %} +{% extends "kaehmy/base.html" %} {% load static %} {% load i18n %} diff --git a/kaehmy/templates/export.html b/templates/kaehmy/export.html similarity index 100% rename from kaehmy/templates/export.html rename to templates/kaehmy/export.html diff --git a/kaehmy/templates/footer.html b/templates/kaehmy/footer.html similarity index 100% rename from kaehmy/templates/footer.html rename to templates/kaehmy/footer.html diff --git a/kaehmy/templates/header.html b/templates/kaehmy/header.html similarity index 100% rename from kaehmy/templates/header.html rename to templates/kaehmy/header.html diff --git a/kaehmy/templates/kaehmy.html b/templates/kaehmy/kaehmy.html similarity index 98% rename from kaehmy/templates/kaehmy.html rename to templates/kaehmy/kaehmy.html index 2fa58be..71d9c84 100644 --- a/kaehmy/templates/kaehmy.html +++ b/templates/kaehmy/kaehmy.html @@ -1,10 +1,10 @@ -{% extends "kaehmy:base.html" %} +{% extends "kaehmy/base.html" %} {% load bootstrap3 %} {% load i18n %} {% block navigation %} - {% include "kaehmy:navigation.html" %} + {% include "kaehmy/navigation.html" %} {% endblock %} {% block content %} diff --git a/kaehmy/templates/list.html b/templates/kaehmy/list.html similarity index 96% rename from kaehmy/templates/list.html rename to templates/kaehmy/list.html index 9a5de8f..0074dbf 100644 --- a/kaehmy/templates/list.html +++ b/templates/kaehmy/list.html @@ -1,10 +1,10 @@ -{% extends "kaehmy:base.html" %} +{% extends "kaehmy/base.html" %} {% load static %} {% load i18n %} {% block navigation %} - {% include "kaehmy:navigation.html" %} + {% include "kaehmy/navigation.html" %} {% endblock %} {% block content %} @@ -97,7 +97,7 @@
{% for message in application.messages.all %} - {% include "kaehmy:message.html" with messages=message.messages.all %} + {% include "kaehmy/message.html" with messages=message.messages.all %} {% endfor %}
diff --git a/kaehmy/templates/message.html b/templates/kaehmy/message.html similarity index 89% rename from kaehmy/templates/message.html rename to templates/kaehmy/message.html index c766649..0374b96 100644 --- a/kaehmy/templates/message.html +++ b/templates/kaehmy/message.html @@ -13,7 +13,7 @@
{% for message in messages %} - {% include "message.html" with messages=message.messages.all %} + {% include "kaehmy/message.html" with messages=message.messages.all %} {% endfor %}
diff --git a/kaehmy/templates/navigation.html b/templates/kaehmy/navigation.html similarity index 100% rename from kaehmy/templates/navigation.html rename to templates/kaehmy/navigation.html diff --git a/kaehmy/templates/statistics.html b/templates/kaehmy/statistics.html similarity index 90% rename from kaehmy/templates/statistics.html rename to templates/kaehmy/statistics.html index 635bb62..42254a3 100644 --- a/kaehmy/templates/statistics.html +++ b/templates/kaehmy/statistics.html @@ -1,10 +1,10 @@ -{% extends "kaehmy:base.html" %} +{% extends "kaehmy/base.html" %} {% load bootstrap3 %} {% load i18n %} {% block navigation %} - {% include "kaehmy:navigation.html" %} + {% include "kaehmy/navigation.html" %} {% endblock %} {% block content %} diff --git a/members/templates/application_delete_confirm.html b/templates/members/application_delete_confirm.html similarity index 94% rename from members/templates/application_delete_confirm.html rename to templates/members/application_delete_confirm.html index a6049fc..e5a3d26 100644 --- a/members/templates/application_delete_confirm.html +++ b/templates/members/application_delete_confirm.html @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "members/base.html" %} {% load i18n %} {% load bootstrap3 %} diff --git a/members/templates/application_edit.html b/templates/members/application_edit.html similarity index 95% rename from members/templates/application_edit.html rename to templates/members/application_edit.html index 78143c2..32af8fc 100644 --- a/members/templates/application_edit.html +++ b/templates/members/application_edit.html @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "members/base.html" %} {% load i18n %} {% load bootstrap3 %} diff --git a/members/templates/application_form_base.html b/templates/members/application_form_base.html similarity index 98% rename from members/templates/application_form_base.html rename to templates/members/application_form_base.html index 18ca670..49bc8b2 100644 --- a/members/templates/application_form_base.html +++ b/templates/members/application_form_base.html @@ -35,6 +35,6 @@ {% block content %} {% endblock content %} - {% include "footer.html" %} + {% include "webapp/footer.html" %} diff --git a/members/templates/application_index.html b/templates/members/application_index.html similarity index 92% rename from members/templates/application_index.html rename to templates/members/application_index.html index db16f1e..770a7aa 100644 --- a/members/templates/application_index.html +++ b/templates/members/application_index.html @@ -1,4 +1,4 @@ -{% extends "application_form_base.html" %} +{% extends "members/application_form_base.html" %} {% load static %} {% load bootstrap3 %} {% load i18n %} diff --git a/members/templates/application_list.html b/templates/members/application_list.html similarity index 92% rename from members/templates/application_list.html rename to templates/members/application_list.html index 5a8f4e0..c8089fe 100644 --- a/members/templates/application_list.html +++ b/templates/members/application_list.html @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "members/base.html" %} {% load i18n %} diff --git a/members/templates/application_success.html b/templates/members/application_success.html similarity index 90% rename from members/templates/application_success.html rename to templates/members/application_success.html index 746b394..b061e5f 100644 --- a/members/templates/application_success.html +++ b/templates/members/application_success.html @@ -1,4 +1,4 @@ -{% extends "application_form_base.html" %} +{% extends "members/application_form_base.html" %} {% load static %} {% load bootstrap3 %} {% load i18n %} diff --git a/members/templates/base.html b/templates/members/base.html similarity index 99% rename from members/templates/base.html rename to templates/members/base.html index c991365..bcb439c 100644 --- a/members/templates/base.html +++ b/templates/members/base.html @@ -91,6 +91,6 @@ - {% include "footer.html" %} + {% include "webapp/footer.html" %} diff --git a/members/templates/email_application_accept.html b/templates/members/email_application_accept.html similarity index 100% rename from members/templates/email_application_accept.html rename to templates/members/email_application_accept.html diff --git a/members/templates/email_application_submit.html b/templates/members/email_application_submit.html similarity index 100% rename from members/templates/email_application_submit.html rename to templates/members/email_application_submit.html diff --git a/members/templates/member_add.html b/templates/members/member_add.html similarity index 93% rename from members/templates/member_add.html rename to templates/members/member_add.html index 7be9009..42983dc 100644 --- a/members/templates/member_add.html +++ b/templates/members/member_add.html @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "members/base.html" %} {% load bootstrap3 %} {% load i18n %} diff --git a/members/templates/member_add_many.html b/templates/members/member_add_many.html similarity index 98% rename from members/templates/member_add_many.html rename to templates/members/member_add_many.html index d9a80bb..d8d59e9 100644 --- a/members/templates/member_add_many.html +++ b/templates/members/member_add_many.html @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "members/base.html" %} {% load i18n %} {% load static %} diff --git a/members/templates/member_add_many_confirm.html b/templates/members/member_add_many_confirm.html similarity index 94% rename from members/templates/member_add_many_confirm.html rename to templates/members/member_add_many_confirm.html index 35f6f12..f05ae0c 100644 --- a/members/templates/member_add_many_confirm.html +++ b/templates/members/member_add_many_confirm.html @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "members/base.html" %} {% load i18n %} diff --git a/members/templates/member_delete_confirm.html b/templates/members/member_delete_confirm.html similarity index 94% rename from members/templates/member_delete_confirm.html rename to templates/members/member_delete_confirm.html index 8c251e9..b653d07 100644 --- a/members/templates/member_delete_confirm.html +++ b/templates/members/member_delete_confirm.html @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "members/base.html" %} {% load i18n %} {% load bootstrap3 %} diff --git a/members/templates/member_edit.html b/templates/members/member_edit.html similarity index 95% rename from members/templates/member_edit.html rename to templates/members/member_edit.html index 11709f9..a875fa9 100644 --- a/members/templates/member_edit.html +++ b/templates/members/member_edit.html @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "members/base.html" %} {% load i18n %} {% load bootstrap3 %} diff --git a/members/templates/member_list.html b/templates/members/member_list.html similarity index 96% rename from members/templates/member_list.html rename to templates/members/member_list.html index 0ec5290..cb40d98 100644 --- a/members/templates/member_list.html +++ b/templates/members/member_list.html @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "members/base.html" %} {% load static %} {% load i18n %} diff --git a/members/templates/payment_add.html b/templates/members/payment_add.html similarity index 95% rename from members/templates/payment_add.html rename to templates/members/payment_add.html index 276f49f..8e62e80 100644 --- a/members/templates/payment_add.html +++ b/templates/members/payment_add.html @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "members/base.html" %} {% load bootstrap3 %} {% load i18n %} diff --git a/members/templates/payment_delete_confirm.html b/templates/members/payment_delete_confirm.html similarity index 94% rename from members/templates/payment_delete_confirm.html rename to templates/members/payment_delete_confirm.html index 1d9fc16..ecea07e 100644 --- a/members/templates/payment_delete_confirm.html +++ b/templates/members/payment_delete_confirm.html @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "members/base.html" %} {% load i18n %} {% load bootstrap3 %} diff --git a/members/templates/payment_edit.html b/templates/members/payment_edit.html similarity index 95% rename from members/templates/payment_edit.html rename to templates/members/payment_edit.html index 07dc6a6..ed201f9 100644 --- a/members/templates/payment_edit.html +++ b/templates/members/payment_edit.html @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "members/base.html" %} {% load i18n %} {% load bootstrap3 %} diff --git a/members/templates/payment_list.html b/templates/members/payment_list.html similarity index 96% rename from members/templates/payment_list.html rename to templates/members/payment_list.html index 765aae5..b2ba1f3 100644 --- a/members/templates/payment_list.html +++ b/templates/members/payment_list.html @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "members/base.html" %} {% load static %} {% load i18n %} diff --git a/members/templates/settings.html b/templates/members/settings.html similarity index 100% rename from members/templates/settings.html rename to templates/members/settings.html diff --git a/members/templates/upload_form.html b/templates/members/upload_form.html similarity index 87% rename from members/templates/upload_form.html rename to templates/members/upload_form.html index 5cc328f..3858338 100644 --- a/members/templates/upload_form.html +++ b/templates/members/upload_form.html @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "members/base.html" %} {% block content %}

{{ title }}

diff --git a/ohlhafv/templates/base.html b/templates/ohlhafv/base.html similarity index 80% rename from ohlhafv/templates/base.html rename to templates/ohlhafv/base.html index 40d9c72..72cd031 100644 --- a/ohlhafv/templates/base.html +++ b/templates/ohlhafv/base.html @@ -11,18 +11,18 @@ {% block body %} {% block header %} - {% include "ohlhafv:header.html" %} + {% include "ohlhafv/header.html" %} {% endblock header %} {% block navigation %} - {% include "ohlhafv:navigation.html" %} + {% include "ohlhafv/navigation.html" %} {% endblock %} {% block content %} {% endblock %} {% block footer %} - {% include "ohlhafv:footer.html" %} + {% include "ohlhafv/footer.html" %} {% endblock footer %} {% endblock body %} \ No newline at end of file diff --git a/ohlhafv/templates/email.html b/templates/ohlhafv/email.html similarity index 100% rename from ohlhafv/templates/email.html rename to templates/ohlhafv/email.html diff --git a/ohlhafv/templates/footer.html b/templates/ohlhafv/footer.html similarity index 100% rename from ohlhafv/templates/footer.html rename to templates/ohlhafv/footer.html diff --git a/ohlhafv/templates/header.html b/templates/ohlhafv/header.html similarity index 100% rename from ohlhafv/templates/header.html rename to templates/ohlhafv/header.html diff --git a/ohlhafv/templates/list.html b/templates/ohlhafv/list.html similarity index 94% rename from ohlhafv/templates/list.html rename to templates/ohlhafv/list.html index df0d75d..db8b83f 100644 --- a/ohlhafv/templates/list.html +++ b/templates/ohlhafv/list.html @@ -1,4 +1,4 @@ -{% extends "ohlhafv:base.html" %} +{% extends "ohlhafv/base.html" %} {% load static %} {% load i18n %} diff --git a/ohlhafv/templates/navigation.html b/templates/ohlhafv/navigation.html similarity index 100% rename from ohlhafv/templates/navigation.html rename to templates/ohlhafv/navigation.html diff --git a/ohlhafv/templates/new.html b/templates/ohlhafv/new.html similarity index 87% rename from ohlhafv/templates/new.html rename to templates/ohlhafv/new.html index 23d6941..61a7e96 100644 --- a/ohlhafv/templates/new.html +++ b/templates/ohlhafv/new.html @@ -1,10 +1,10 @@ -{% extends "ohlhafv:base.html" %} +{% extends "ohlhafv/base.html" %} {% load bootstrap3 %} {% load i18n %} {% block navigation %} - {% include "ohlhafv:navigation.html" %} + {% include "ohlhafv/navigation.html" %} {% endblock %} {% block content %} diff --git a/ohlhafv/templates/tgmsg.tpl b/templates/ohlhafv/tgmsg.tpl similarity index 100% rename from ohlhafv/templates/tgmsg.tpl rename to templates/ohlhafv/tgmsg.tpl diff --git a/webapp/templates/base.html b/templates/webapp/base.html similarity index 84% rename from webapp/templates/base.html rename to templates/webapp/base.html index d785f01..dd5526e 100644 --- a/webapp/templates/base.html +++ b/templates/webapp/base.html @@ -14,14 +14,14 @@
{% block header %} - {% include "header.html" %} + {% include "webapp/header.html" %} {% endblock %}
{% block navigation %} - {% include "navigation.html" %} + {% include "webapp/navigation.html" %} {% endblock %}
@@ -33,6 +33,6 @@ {% block footer %} - {% include "footer.html" %} + {% include "webapp/footer.html" %} {% endblock footer %} {% endblock %} diff --git a/webapp/templates/contact.html b/templates/webapp/contact.html similarity index 97% rename from webapp/templates/contact.html rename to templates/webapp/contact.html index d85bcb8..d9c92f5 100644 --- a/webapp/templates/contact.html +++ b/templates/webapp/contact.html @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "webapp/base.html" %} {% block content %} {% load i18n %} diff --git a/webapp/templates/event_calendar.html b/templates/webapp/event_calendar.html similarity index 89% rename from webapp/templates/event_calendar.html rename to templates/webapp/event_calendar.html index a2e99be..d595acf 100644 --- a/webapp/templates/event_calendar.html +++ b/templates/webapp/event_calendar.html @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "webapp/base.html" %} {% block content %} {% load i18n %} diff --git a/webapp/templates/footer.html b/templates/webapp/footer.html similarity index 100% rename from webapp/templates/footer.html rename to templates/webapp/footer.html diff --git a/webapp/templates/freshmen.html b/templates/webapp/freshmen.html similarity index 88% rename from webapp/templates/freshmen.html rename to templates/webapp/freshmen.html index 2702258..f5abe89 100644 --- a/webapp/templates/freshmen.html +++ b/templates/webapp/freshmen.html @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "webapp/base.html" %} {% block content %} {% load i18n %} diff --git a/webapp/templates/guild.html b/templates/webapp/guild.html similarity index 88% rename from webapp/templates/guild.html rename to templates/webapp/guild.html index adc37db..39b096a 100644 --- a/webapp/templates/guild.html +++ b/templates/webapp/guild.html @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "webapp/base.html" %} {% block content %} {% load i18n %} diff --git a/webapp/templates/header.html b/templates/webapp/header.html similarity index 100% rename from webapp/templates/header.html rename to templates/webapp/header.html diff --git a/webapp/templates/index.html b/templates/webapp/index.html similarity index 97% rename from webapp/templates/index.html rename to templates/webapp/index.html index 2cf0926..7032787 100644 --- a/webapp/templates/index.html +++ b/templates/webapp/index.html @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "webapp/base.html" %} {% load i18n %} {% block content %} diff --git a/webapp/templates/international.html b/templates/webapp/international.html similarity index 89% rename from webapp/templates/international.html rename to templates/webapp/international.html index f07c322..3980fa8 100644 --- a/webapp/templates/international.html +++ b/templates/webapp/international.html @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "webapp/base.html" %} {% block content %} {% load i18n %} diff --git a/webapp/templates/jobs.html b/templates/webapp/jobs.html similarity index 88% rename from webapp/templates/jobs.html rename to templates/webapp/jobs.html index d07cd96..8f51e36 100644 --- a/webapp/templates/jobs.html +++ b/templates/webapp/jobs.html @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "webapp/base.html" %} {% block content %} {% load i18n %} diff --git a/webapp/templates/navigation.html b/templates/webapp/navigation.html similarity index 100% rename from webapp/templates/navigation.html rename to templates/webapp/navigation.html diff --git a/webapp/templates/signup_email.html b/templates/webapp/signup_email.html similarity index 100% rename from webapp/templates/signup_email.html rename to templates/webapp/signup_email.html diff --git a/webapp/templates/sosso.html b/templates/webapp/sosso.html similarity index 88% rename from webapp/templates/sosso.html rename to templates/webapp/sosso.html index f96a7ff..ef8f566 100644 --- a/webapp/templates/sosso.html +++ b/templates/webapp/sosso.html @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "webapp/base.html" %} {% block content %} {% load i18n %} diff --git a/webapp/templates/tg_message.tpl b/templates/webapp/tg_message.tpl similarity index 100% rename from webapp/templates/tg_message.tpl rename to templates/webapp/tg_message.tpl diff --git a/webapp/utils.py b/webapp/utils.py index 58bbfde..af24679 100644 --- a/webapp/utils.py +++ b/webapp/utils.py @@ -106,7 +106,7 @@ def send_email(to: str, subject: str, body: str, html: bool = False): def send_signup_email(to, subject, id, uuid, content): message = render_to_string( - "signup_email.html", + "webapp/signup_email.html", { "url": f"https://{FRONTEND_URL}/signup/edit/{id}/{uuid}", "content": markdown.markdown(content),