示例#1
0
    def get(self, tag):
        if tag is not None:
            print "Query: ", tag
            posts = Post.objects(display_tags__all=[tag])

        return render_template('posts/list.html', posts=posts, query=("#"+str(tag)))
示例#2
0
    def get(self, query):
        if query is not None:
            posts = Post.objects(title__icontains=query)

        return render_template('posts/list.html', posts=posts, query=query)