def get(self, name): if not self.logged_in(): self.redirect("/login") article_id = self.request.get("v") article = None if article_id: article = Article.by_id(article_id) else: article = Article.most_recent_by_name(name) self.render("edit.html", article=article)
def get(self, name): article = Article.most_recent_by_name(name) articles = Article.all_by_name(name) if not articles: self.redirect("/edit" + name) self.render("history.html", article=article, articles=articles)