From f6ae3b42d120e1a0b38eed9880109de2a5ec8b04 Mon Sep 17 00:00:00 2001 From: Dan Palmer Date: Tue, 5 Jan 2021 15:14:45 +0000 Subject: [PATCH] Move home page into namespaced dir and format --- response/templates/home.html | 31 ------------------------ response/templates/response/home.html | 35 +++++++++++++++++++++++++++ response/ui/views.py | 4 ++- 3 files changed, 38 insertions(+), 32 deletions(-) delete mode 100644 response/templates/home.html create mode 100644 response/templates/response/home.html diff --git a/response/templates/home.html b/response/templates/home.html deleted file mode 100644 index d0486afe..00000000 --- a/response/templates/home.html +++ /dev/null @@ -1,31 +0,0 @@ -{% extends "base.html" %} -{% load static %} -{% load unslackify %} -{% load markdown_filter %} - -{% block head %} - -{% endblock %} - - -{% block content %} -
-
- {% comment %} ----- Heading ----- {% endcomment %} -

Incidents

-
- -
-
    - {% for incident in incidents %} -
  • - {{ incident.severity_emoji }} - Incident {{ incident.pk }}  - {{ incident.status_text|upper }} - - {{ incident.report }} -
  • - {% endfor %} -
-
-
-{% endblock %} diff --git a/response/templates/response/home.html b/response/templates/response/home.html new file mode 100644 index 00000000..7e430a0f --- /dev/null +++ b/response/templates/response/home.html @@ -0,0 +1,35 @@ +{% extends "response/base.html" %} +{% load static %} +{% load unslackify %} +{% load markdown_filter %} + +{% block head %} + +{% endblock %} + + +{% block content %} +
+
+ {% comment %} ----- Heading ----- {% endcomment %} +

Incidents

+
+ +
+
    + {% for incident in incidents %} +
  • + {{ incident.severity_emoji }} + + Incident {{ incident.pk }}  + + + {{ incident.status_text|upper }} + + - {{ incident.report }} +
  • + {% endfor %} +
+
+
+{% endblock %} diff --git a/response/ui/views.py b/response/ui/views.py index f59f7796..7f7443cb 100644 --- a/response/ui/views.py +++ b/response/ui/views.py @@ -9,7 +9,9 @@ @response_login_required def home(request: HttpRequest): incidents = Incident.objects.all - return render(request, template_name="home.html", context={"incidents": incidents}) + return render( + request, template_name="response/home.html", context={"incidents": incidents} + ) @response_login_required