Skip to content

Commit f6ae3b4

Browse files
committed
Move home page into namespaced dir and format
1 parent 77b9d94 commit f6ae3b4

3 files changed

Lines changed: 38 additions & 32 deletions

File tree

response/templates/home.html

Lines changed: 0 additions & 31 deletions
This file was deleted.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{% extends "response/base.html" %}
2+
{% load static %}
3+
{% load unslackify %}
4+
{% load markdown_filter %}
5+
6+
{% block head %}
7+
<link rel="stylesheet" href="{% static 'incident_doc.css' %}">
8+
{% endblock %}
9+
10+
11+
{% block content %}
12+
<div class="row pb-4">
13+
<div class="col-lg-12 text-center">
14+
{% comment %} ----- Heading ----- {% endcomment %}
15+
<h1 class="mt-3" id="title"><a href="">Incidents</a></h1>
16+
</div>
17+
18+
<div class="col-lg-12">
19+
<ul>
20+
{% for incident in incidents %}
21+
<li>
22+
{{ incident.severity_emoji }}
23+
<a href="{% url 'incident_doc' incident.pk %}" target="_blank">
24+
Incident {{ incident.pk }}&nbsp;
25+
</a>
26+
<span class="badge {{ incident.badge_type }} blink_me">
27+
{{ incident.status_text|upper }}
28+
</span>
29+
- {{ incident.report }}
30+
</li>
31+
{% endfor %}
32+
</ul>
33+
</div>
34+
</div>
35+
{% endblock %}

response/ui/views.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
@response_login_required
1010
def home(request: HttpRequest):
1111
incidents = Incident.objects.all
12-
return render(request, template_name="home.html", context={"incidents": incidents})
12+
return render(
13+
request, template_name="response/home.html", context={"incidents": incidents}
14+
)
1315

1416

1517
@response_login_required

0 commit comments

Comments
 (0)