Add list of domains

This commit is contained in:
Joakim Hellsén 2024-02-23 13:34:40 +01:00
commit 062c80c413
5 changed files with 78 additions and 2 deletions

19
templates/domains.html Normal file
View file

@ -0,0 +1,19 @@
{% extends "base.html" %}
{% block content %}
<h2>Domains</h2>
<p>
These are the domains that have been added to the database.
{% if domains|length > 0 %}There are {{ domains|length }} domains in the database.{% endif %}
</p>
<ul>
{% for domain in domains %}
{% if not domain.hidden %}
<li>
<a href="/domain/{{ domain.id }}">{{ domain.url }}</a> - {{ domain.created_at|date }}
</li>
{% endif %}
{% empty %}
<li>Found no domains in the database.</li>
{% endfor %}
</ul>
{% endblock %}