fixed some issues with non-used tags

This commit is contained in:
Esther Kleinhenz
2018-10-24 19:04:43 +02:00
parent f5980566ae
commit 7ed667d043
5 changed files with 121 additions and 19 deletions
+5 -12
View File
@@ -12,18 +12,11 @@
</ul>
</div>
<div>
</div>
<form id="searchform" action="{% url 'blog_search_list_view' %}" method="get" accept-charset="utf-8">
<button class="searchbutton" type="submit">
<i class="fa fa-search"></i>
</button>
<input class="searchfield" id="searchbox" name="q" type="text" placeholder="Search">
</form>
<div class="table-responsive">
<table class="table table-striped table-bordered table-hover">
</table>
</div>
{% if messages %}
{% for message in messages %}
<div {% if message.tags %} class="{{ message.tags }}" {% endif %}>{{ message }}</div>
{% endfor %}
{% endif %}
<form class="post-form" method="post">
{% csrf_token %} {{form.as_p}}
<button type="submit" class="save btn btn-outline-dark">Save</button>
+1
View File
@@ -1,4 +1,5 @@
{% extends "base.html" %} {% block content %}
{% load taggit_templatetags2_tags %}
<div>
</div>
+20
View File
@@ -0,0 +1,20 @@
{% extends 'base.html' %} {% block content %}
{% if tag %} Posts tagged with "{{ tag.name }}" {% endif %}
{% for post in posts %}
<div class="post">
<div class="date">
{{ post.published_date }}
</div>
<h1>
<a href="{% url 'post_detail' pk=post.pk %}">{{ post.title }}</a>
</h1>
<p>{{ post.text|linebreaks }}</p>
Tags: {% for tag in post.tags.all %}
<a href="{% url 'student_page_remove' tag.slug %}">{{ tag.name }}</a>
{% if not forloop.last %}, {% endif %} {% endfor %} <p>
{{ post.author }}
</p>
</div>
{% endfor %}
</div>
{% endblock %}