(request, topic)
return render(request, template_name="post_topic.html", context=context)
Show list of posts of a given type
Show list of posts of a given type
Show list of posts of a given type
def post_topic(request, topic):
    """
    Show list of posts of a given type
    """

    # Set the cache key based on order and limit
    posts = post_list(request, topic=topic, cutoff=1000)

    # Clear topic if there are no posts.
    topic = topic if posts else ''
    context = dict(posts=posts, topic=topic, tab=topic)

    return render(request, template_name="post_topic.html", context=context)
def post_topic ( request , topic ) : # Set the cache key based on order and limit posts = post_list ( request , topic = topic , cutoff = 1000 ) # Clear topic if there are no posts. topic = topic if posts else '' context = dict ( posts = posts , topic = topic , tab = topic ) return render ( request , template_name = "post_topic.html" , context = context )