shows tags of each post in post_list
This commit is contained in:
@@ -17,5 +17,7 @@
|
||||
{% endif %}
|
||||
<h1>{{ post.title }}</h1>
|
||||
<p>{{ post.text|linebreaksbr }}</p>
|
||||
<p>{{ post.tag }}</p>
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -7,5 +7,10 @@
|
||||
<a href="{% url 'post_detail' pk=post.pk %}">{{ post.title }}</a>
|
||||
</h1>
|
||||
<p>{{ post.text|linebreaks }}</p>
|
||||
{% for tag in post.tags.all %}
|
||||
<p>{{ tag.name }}</p>
|
||||
{% endfor %}
|
||||
|
||||
|
||||
</div>
|
||||
{% endfor %} {% endblock %}
|
||||
@@ -6,8 +6,6 @@
|
||||
</button>
|
||||
<input class="searchfield" id="searchbox" name="q" type="text" placeholder="Search">
|
||||
</form>
|
||||
<div>{{Post.objects.filter(tags__name__in= ["hi"])}}
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-bordered table-hover">
|
||||
</table>
|
||||
|
||||
Reference in New Issue
Block a user