def POST(self, name): authen = gc('name') if authen: article = Article.get(name) article.delete() return js(dict(r=True, id=name)) return js(dict(r=False))
def POST(self): req = gd() name = gc('name') if name: user = get_user(name) ok = add(req.cate, req.title, req.url, req.content, user.name) return js(dict(r = True, ok = ok)) else: return js(dict(r = False))
def POST(self): req = gd() name = gc("name") if name: user = get_user(name) ok = add(req.cate, req.title, req.url, req.content, user.name) return js(dict(r=True, ok=ok)) else: return js(dict(r=False))
def POST(self, id): article = Article.get(id) cate = article.cate req = gd() article.title = req.title article.cate = req.cate article.url = req.url article.content = req.content article.update(cate) return js(dict(r=True, ok=True, id=id))
def POST(self): req = gd() authen = authen_user(req.name, req.pwd) if authen: sc('name', req.name) return js(dict(r=True, authen=authen))