Ejemplo n.º 1
0
 def get(self, url_safe_key=""):
     self.login()
     posts = []
     if not url_safe_key:
         posts = Post.all_posts()
         if posts.count() == 0:
             posts = []
         self.render("blog.html", posts=posts)
     else:
         post = self.get_by_urlsafe(url_safe_key)
         if post:
             posts = [post]
             self.render("post.html", posts=posts)
Ejemplo n.º 2
0
def walk_around():
    posts = Post.all_posts().all()
    return render_template('walk_around.html', posts = posts)