added filter and some design things

This commit is contained in:
Esther Kleinhenz
2018-11-18 18:39:08 +01:00
parent b03b106fd8
commit 94573dc28b
23 changed files with 318 additions and 125 deletions
+24 -1
View File
@@ -28,5 +28,28 @@
<input type="hidden" name="next" value="{{ next }}" />
</div>
</form>
<div>
<div class="row">
<div class="col-md-8">
<div>
{% for post in posts %}
<div class="mt-5 post">
<div class="date">
{{ post.published_date }}
</div>
<h2>
<a href="{% url 'post_detail' pk=post.pk %}">{{ post.title }}</a>
</h2>
<p>{{ post.text|linebreaks }}</p>
Tags: {% for tag in post.tags.all %}
<a href="{% url 'post_list_by_tag' tag.slug %}">{{ tag.name }}</a>
{% if not forloop.last %}, {% endif %} {% endfor %} <p>
{{ post.author }}
</p>
</div>
{% endfor %}
</div>
</div>
</div>
</div>
{% endblock %}