def POST(self): f=note_form() if f.validates(): note_body=f.note_body.value user=get_current_user() addPost(Post(user.get('name'), note_body)) raise web.seeother('/user/{u}'.format(u=user.get('name'))) return render_template('generic_form.html',f=f)
def GET(self): f=note_form() return render_template('generic_form.html', f=f)