Skip to content

Commit da5e08a

Browse files
authored
style: Indent HTML templates with djhtml (#601)
1 parent 84b9a22 commit da5e08a

25 files changed

+1382
-1369
lines changed

.github/workflows/main.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,3 +108,16 @@ jobs:
108108
push: ${{ github.event_name != 'pull_request' }}
109109
tags: ${{ steps.meta.outputs.tags }}
110110
labels: ${{ steps.meta.outputs.labels }}
111+
112+
djhtml:
113+
runs-on: ubuntu-latest
114+
steps:
115+
- uses: actions/checkout@v4
116+
- name: Set up Python
117+
uses: actions/setup-python@v5
118+
with:
119+
python-version: "3.10"
120+
- name: Install djhtml
121+
run: python -m pip install --upgrade pip djhtml
122+
- name: Lint HTML files
123+
run: djhtml . --check
Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,47 @@
11
{% extends "base/base.html"%}
22
{% load i18n %}
33
{% block content %}
4-
<div class="row justify-content-md-center">
5-
<div class="col-lg-10 col-centered">
6-
{% if request.user.is_superuser %}
7-
<table class="table table-hover">
8-
{% for q in queries %}
9-
<tr>
10-
<td>
11-
<a href="{% url 'analysis:wait' q.id %}">{{ q.id }}</a>
12-
</td>
13-
<td>
14-
{% if q.source == 'fdroid' %}
15-
<a target="_blank" rel="noreferrer" href="https://f-droid.org/packages/{{ q.handle }}">{{ q.handle | truncatechars_html:40 }}</a>
16-
{% else %}
17-
<a target="_blank" rel="noreferrer" href="https://play.google.com/store/apps/details?id={{ q.handle }}">{{ q.handle | truncatechars_html:40 }}</a>
18-
{% endif %}
19-
</td>
20-
<td>
21-
{{ q.source }}
22-
</td>
23-
<td>
24-
{{ q.uploaded_at }}
25-
</td>
26-
<td>
27-
{% if q.processed %}
28-
{% if q.in_error %}
29-
<span class="text-danger" data-toggle="tooltip" title="{{ q.description }}">error</span>
4+
<div class="row justify-content-md-center">
5+
<div class="col-lg-10 col-centered">
6+
{% if request.user.is_superuser %}
7+
<table class="table table-hover">
8+
{% for q in queries %}
9+
<tr>
10+
<td>
11+
<a href="{% url 'analysis:wait' q.id %}">{{ q.id }}</a>
12+
</td>
13+
<td>
14+
{% if q.source == 'fdroid' %}
15+
<a target="_blank" rel="noreferrer" href="https://f-droid.org/packages/{{ q.handle }}">{{ q.handle | truncatechars_html:40 }}</a>
3016
{% else %}
31-
<span class="text-success">complete</span>
17+
<a target="_blank" rel="noreferrer" href="https://play.google.com/store/apps/details?id={{ q.handle }}">{{ q.handle | truncatechars_html:40 }}</a>
3218
{% endif %}
33-
{% else %}
34-
<span class="text-warning">in progress</span>
35-
{% endif %}
36-
</td>
37-
</tr>
38-
{% endfor %}
39-
</table>
40-
{% else %}
41-
<div class="alert alert-danger small">
42-
<strong>{% trans "You need to be registered" %}.</strong>
43-
</div>
44-
{% endif %}
19+
</td>
20+
<td>
21+
{{ q.source }}
22+
</td>
23+
<td>
24+
{{ q.uploaded_at }}
25+
</td>
26+
<td>
27+
{% if q.processed %}
28+
{% if q.in_error %}
29+
<span class="text-danger" data-toggle="tooltip" title="{{ q.description }}">error</span>
30+
{% else %}
31+
<span class="text-success">complete</span>
32+
{% endif %}
33+
{% else %}
34+
<span class="text-warning">in progress</span>
35+
{% endif %}
36+
</td>
37+
</tr>
38+
{% endfor %}
39+
</table>
40+
{% else %}
41+
<div class="alert alert-danger small">
42+
<strong>{% trans "You need to be registered" %}.</strong>
43+
</div>
44+
{% endif %}
45+
</div>
4546
</div>
46-
</div>
4747
{% endblock %}

0 commit comments

Comments
 (0)