urls.py
path('posts/',views.posts,name='posts'),
path('<id>',views.detail_view,name='detail_view'),
views.py
def posts(request):
posts = Post.objects.all().order_by('-date_added')
context = {'posts':posts}
return render(request, 'mains/post.html', context)
post.html
{% block content %}
{% for topic in posts %}
<a>{{ topic.description}}</a> <a href="{% url 'mains:detail_view'
topic.post_owner.id %}">Show
More</a><br>
<br>
{% empty %}
No yet.</li>
{% endfor %}
Post matching query does not exist. This error is raising when i click on show_more in posts page. Please Help me in this. I will really appreciate your Help.