def get_newpost():
cookie = bottle.request.get_cookie("session")
username = sessions.get_username(cookie) # see if user is logged in
if username is None:
bottle.redirect("/login")
return bottle.template("newpost_template", dict(subject="", body = "", errors="", tags="", username=username))
#
# Post handler for setting up a new post.
# Only works for logged in user.
评论列表
文章目录