Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: Indent HTML templates with djhtml #601

Merged
merged 4 commits into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,16 @@ jobs:
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

djhtml:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install djhtml
run: python -m pip install --upgrade pip djhtml
- name: Lint HTML files
run: djhtml . --check
80 changes: 40 additions & 40 deletions exodus/analysis_query/templates/queries_list.html
Original file line number Diff line number Diff line change
@@ -1,47 +1,47 @@
{% extends "base/base.html"%}
{% load i18n %}
{% block content %}
<div class="row justify-content-md-center">
<div class="col-lg-10 col-centered">
{% if request.user.is_superuser %}
<table class="table table-hover">
{% for q in queries %}
<tr>
<td>
<a href="{% url 'analysis:wait' q.id %}">{{ q.id }}</a>
</td>
<td>
{% if q.source == 'fdroid' %}
<a target="_blank" rel="noreferrer" href="https://f-droid.org/packages/{{ q.handle }}">{{ q.handle | truncatechars_html:40 }}</a>
{% else %}
<a target="_blank" rel="noreferrer" href="https://play.google.com/store/apps/details?id={{ q.handle }}">{{ q.handle | truncatechars_html:40 }}</a>
{% endif %}
</td>
<td>
{{ q.source }}
</td>
<td>
{{ q.uploaded_at }}
</td>
<td>
{% if q.processed %}
{% if q.in_error %}
<span class="text-danger" data-toggle="tooltip" title="{{ q.description }}">error</span>
<div class="row justify-content-md-center">
<div class="col-lg-10 col-centered">
{% if request.user.is_superuser %}
<table class="table table-hover">
{% for q in queries %}
<tr>
<td>
<a href="{% url 'analysis:wait' q.id %}">{{ q.id }}</a>
</td>
<td>
{% if q.source == 'fdroid' %}
<a target="_blank" rel="noreferrer" href="https://f-droid.org/packages/{{ q.handle }}">{{ q.handle | truncatechars_html:40 }}</a>
{% else %}
<span class="text-success">complete</span>
<a target="_blank" rel="noreferrer" href="https://play.google.com/store/apps/details?id={{ q.handle }}">{{ q.handle | truncatechars_html:40 }}</a>
{% endif %}
{% else %}
<span class="text-warning">in progress</span>
{% endif %}
</td>
</tr>
{% endfor %}
</table>
{% else %}
<div class="alert alert-danger small">
<strong>{% trans "You need to be registered" %}.</strong>
</div>
{% endif %}
</td>
<td>
{{ q.source }}
</td>
<td>
{{ q.uploaded_at }}
</td>
<td>
{% if q.processed %}
{% if q.in_error %}
<span class="text-danger" data-toggle="tooltip" title="{{ q.description }}">error</span>
{% else %}
<span class="text-success">complete</span>
{% endif %}
{% else %}
<span class="text-warning">in progress</span>
{% endif %}
</td>
</tr>
{% endfor %}
</table>
{% else %}
<div class="alert alert-danger small">
<strong>{% trans "You need to be registered" %}.</strong>
</div>
{% endif %}
</div>
</div>
</div>
{% endblock %}
Loading
Loading