Add list of domains
This commit is contained in:
parent
05d7da1f59
commit
062c80c413
5 changed files with 78 additions and 2 deletions
|
|
@ -104,7 +104,9 @@
|
|||
<small>
|
||||
<div class="leftright">
|
||||
<div class="left">
|
||||
<a href='{% url "feeds:index" %}'>Home</a> | <a href='{% url "feeds:feeds" %}'>Feeds</a> |
|
||||
<a href='{% url "feeds:index" %}'>Home</a> |
|
||||
<a href='{% url "feeds:domains" %}'>Domains</a> |
|
||||
<a href='{% url "feeds:feeds" %}'>Feeds</a> |
|
||||
<a href='{% url "feeds:api" %}'>API</a>
|
||||
</div>
|
||||
<div class="right">
|
||||
|
|
|
|||
15
templates/domain.html
Normal file
15
templates/domain.html
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
<h2>{{ domain.url }}</h2>
|
||||
<p>This domain was added to the database on {{ domain.created_at|date }}.</p>
|
||||
<p>Feeds for this domain:</p>
|
||||
<ul>
|
||||
{% for feed in feeds %}
|
||||
<li>
|
||||
<a href="/feed/{{ feed.id }}">{{ feed.feed_url }}</a>
|
||||
</li>
|
||||
{% empty %}
|
||||
<li>Found no feeds for this domain.</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endblock %}
|
||||
19
templates/domains.html
Normal file
19
templates/domains.html
Normal 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 %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue