def register_view(request): result = request.query.get('result', '') result = unquote_plus(result) body = GuaTemplate.render('register.html', result=result) return html_response(body)
def edit(request): todo_id = int(request.query['id']) t = Todo.find_by(id=todo_id) body = Template.render('todo_edit.html', todo=t) return html_response(body)
def register_view(request): result = request.query.get('result', '') result = unquote_plus(result) return html_response('register.html', result=result)
def index(request): """ 主页的处理函数, 返回主页的响应 """ u = current_user(request) return html_response('index.html', username=u.username)
def edit(request): weibo_id = int(request.query['id']) w = Weibo.find_by(id=weibo_id) body = RenderTemplate.render('weibo_edit.html', weibo=w) return html_response(body)
def comment_edit(request): comment_id = int(request.query['id']) c = Comment.one(id=comment_id) log('in the comment_edit', c) return html_response('comment_edit.html', comment=c)
def index(request): """ todo 首页的路由函数 """ body = GuaTemplate.render('todo_index.html') return html_response(body)
def edit(request): todo_id = int(request.query['id']) t = Todo.one(id=todo_id) token = new_csrf_token(request) return html_response('todo_edit.html', todo=t, token=token)
def edit(request): weibo_id = int(request.query['id']) w = Weibo.one(id=weibo_id) return html_response('weibo_edit.html', weibo=w)
def index(request): u = current_user(request) return html_response('todo_ajax_index.html')
def index(request): u = current_user(request) return html_response('index.html', username=u.username)
def edit(request): log('routes comment edit') comment_id = int(request.query['id']) c = Comment.one(id=comment_id) return html_response('comment_edit.html', comment=c)
def index(request): """ todo 首页的路由函数 """ # 替换模板文件中的标记字符串 return html_response('todo_ajax_index.html')
def ajax_view(request): return html_response('ajax.html')