diff --git a/webapp/static/img/missing.png b/webapp/static/img/missing.png new file mode 100644 index 0000000..85d21d2 Binary files /dev/null and b/webapp/static/img/missing.png differ diff --git a/webapp/templates/contact.html b/webapp/templates/contact.html index 1be617e..a7643c3 100644 --- a/webapp/templates/contact.html +++ b/webapp/templates/contact.html @@ -8,6 +8,27 @@

{% trans "Contact" %}

+
+ {% if kaikki %} + + {% for teekkari in kaikki %} + {% load static %} + + + + + {% endfor %} +
+ + +

{{ teekkari.first_name }} {{ teekkari.last_name }}

+ +

{{ teekkari.phone_number }}

+
+ {% else %} +

Ei henkilöitä

+ {% endif %} +
diff --git a/webapp/views.py b/webapp/views.py index 63e9090..64915ad 100644 --- a/webapp/views.py +++ b/webapp/views.py @@ -13,7 +13,7 @@ import logging import requests from dealer.git import git -from webapp.models import PresetKaehmyRole, CustomKaehmyRole +from webapp.models import PresetKaehmyRole, CustomKaehmyRole, Official from webapp.models import OhlhafvChallenge, KaehmyForm, TelegramChannel from webapp.forms import OhlhafvForm, KaehmyForm_Form, KaehmyCommentForm from webapp.tables import OhlhafvTable, KaehmyExportTable @@ -144,7 +144,11 @@ def sosso_view(request, *args, **kwargs): @require_http_methods(["GET"]) def contact_view(request, *args, **kwargs): """Render "Contact" page.""" - return render(request, "contact.html", {}) + + kaikki = Official.objects.all() + context = {"kaikki": kaikki} + + return render(request, "contact.html", context) @require_http_methods(["GET"])