def get(self, _id=None): r, v = m_info(TProject, _id) ur, uv = m_info(T_Account, v['author']) v['authorname'] = uv.get('nickname', None) or uv['username'] self.render('action/projectinfo.html', info=v)
def get(self, listname=None): cond = {'category': listname} since = self.get_argument('since', None) r, cate = m_info(T_Category, listname, key='listname') r, news = m_page(TNews, since=since, **cond) for n in news: r, user = m_info(T_Account, n.get('author')) n['authorname'] = user.get('nickname', user.get('username')) self.labels = suggest(3) r, comments = m_page(T_Comment) for c in comments: r, n = m_info(TNews, c.get('news_id')) if r and n: c['title'] = n.get('title') r, user = m_info(T_Account, c.get('author')) if r and user: c['authorname'] = user.get('nickname', user.get('username')) self.comments = comments self.render('action/newslist.html', news=news, since=since, title=cate.get('name'))
def get(self,_id=None): r,v = m_info(TProject,_id) ur,uv = m_info(T_Account,v['author']) v['authorname'] = uv.get('nickname',None) or uv['username'] self.render('action/projectinfo.html',info = v)
def get(self, _id=None): r, v = m_info(TNews, _id) cr, cv = m_info(T_Category, v['category'], key='listname') v['categoryname'] = cv['name'] ur, uv = m_info(T_Account, v['author']) v['authorname'] = uv.get('nickname', None) or uv['username'] self.render('action/newsinfo.html', info=v)
def get(self,_id=None): r,v = m_info(TNews,_id) cr,cv = m_info(T_Category,v['category'],key='listname') v['categoryname'] = cv['name'] ur,uv = m_info(T_Account,v['author']) v['authorname'] = uv.get('nickname',None) or uv['username'] self.render('action/newsinfo.html',info = v)
def get(self): _id = self.get_argument("id", None) info = {} if _id: r,info = m_info(T_ACCOUNT,_id) self.render('admin/accountinfo.html', info = info)
def get(self): _id = self.get_argument("id", None) info = {} if _id: r,info = m_info(T_Servercity,_id) self.render('admin/servercityinfo.html', info = info)
def get(self): _id = self.get_argument("id", None) info = {} if _id: r, info = m_info(T_ACCOUNT, _id) self.render('admin/accountinfo.html', info=info)
def get(self): _id = self.get_argument("id", None) info = {} if _id: r, info = m_info(TNews, _id) self.render('admin/newsinfo.html', info=info)
def get(self): _id = self.get_argument("id", None) info = {} if _id: r, info = m_info(T_CATEGORY, _id) self.render('admin/categoryinfo.html', info=info)
def get(self): _id = self.get_argument("id", None) info = {} if _id: r,info = m_info(T_CATEGORY,_id) self.render('admin/categoryinfo.html', info = info)
def get(self): _id = self.get_argument("id", None) info = {} if _id: r, info = m_info(TNews, _id) self.render("admin/newsinfo.html", info=info)
def get(self, news_id): since = self.get_argument("since", None) r, data = m_page(TComment, since=since, news_id=news_id) for item in data: r, v = m_info(T_Account, item["author"]) if r and v: item["authorname"] = v.get("nickname", v["username"]) self.write(dict(status=r, data=data))
def get(self, news_id): since = self.get_argument('since', None) r, data = m_page(TComment, since=since, news_id=news_id) for item in data: r, v = m_info(T_Account, item['author']) if r and v: item['authorname'] = v.get('nickname', v['username']) self.write(dict(status=r, data=data))
def get(self): since = self.get_argument('since',None) keys = self.get_arguments('key') cond = {'labels':{'$in':keys}} r,project = m_page(TProject,since=since,**cond) for n in project: r,user = m_info(T_Account,n.get('author')) n['authorname'] = user.get('nickname',user.get('username')) self.labels = suggest(3) self.render('action/projectlist.html',project=project,since=since, title=keys)
def get(self): since = self.get_argument('since', None) keys = self.get_arguments('key') cond = {'labels': {'$in': keys}} r, news = m_page(TNews, since=since, **cond) for n in news: r, user = m_info(T_Account, n.get('author')) n['authorname'] = user.get('nickname', user.get('username')) self.labels = suggest(3) r, comments = m_page(T_Comment) for c in comments: r, n = m_info(TNews, c.get('news_id')) if r and n: c['title'] = n.get('title') r, user = m_info(T_Account, c.get('author')) if r and user: c['authorname'] = user.get('nickname', user.get('username')) self.comments = comments self.render('action/newslist.html', news=news, since=since, title=keys)
def get(self): since = self.get_argument('since',None) keys = self.get_arguments('key') cond = {'labels':{'$in':keys}} r,news = m_page(TNews,since=since,**cond) for n in news: r,user = m_info(T_Account,n.get('author')) n['authorname'] = user.get('nickname',user.get('username')) self.labels = suggest(3) r,comments = m_page(T_Comment) for c in comments: r,n = m_info(TNews,c.get('news_id')) if r and n: c['title'] = n.get('title') r,user = m_info(T_Account,c.get('author')) if r and user: c['authorname'] = user.get('nickname',user.get('username')) self.comments = comments self.render('action/newslist.html',news=news,since=since, title=keys)
def get(self): self.oneday = hot(5,1) self.weeknews = hot(5,7) self.monthnews = hot(5,30) r,self.categorys = m_page(T_Category,size=10) news = {} for cate in self.categorys: r,news[cate.get('listname')] = m_page(TNews,category=cate.get('listname')) self.news = news self.labels = suggest(3) r,comments = m_page(T_Comment) for c in comments: r,n = m_info(TNews,c.get('news_id')) if r and n: c['title'] = n.get('title') r,user = m_info(T_Account,c.get('author')) if r and user: c['authorname'] = user.get('nickname',user.get('username')) self.comments = comments self.render('action/news.html')
def get(self): since = self.get_argument('since', None) keys = self.get_arguments('key') cond = {'labels': {'$in': keys}} r, project = m_page(TProject, since=since, **cond) for n in project: r, user = m_info(T_Account, n.get('author')) n['authorname'] = user.get('nickname', user.get('username')) self.labels = suggest(3) self.render('action/projectlist.html', project=project, since=since, title=keys)
def get(self,listname=None): cond = {'category':listname} since = self.get_argument('since',None) r,cate = m_info(T_Category,listname,key='listname') r,news = m_page(TNews,since=since,**cond) for n in news: r,user = m_info(T_Account,n.get('author')) n['authorname'] = user.get('nickname',user.get('username')) self.labels = suggest(3) r,comments = m_page(T_Comment) for c in comments: r,n = m_info(TNews,c.get('news_id')) if r and n: c['title'] = n.get('title') r,user = m_info(T_Account,c.get('author')) if r and user: c['authorname'] = user.get('nickname',user.get('username')) self.comments = comments self.render('action/newslist.html',news=news,since=since, title= cate.get('name'))
def get(self): self.oneday = hot(5, 1) self.weeknews = hot(5, 7) self.monthnews = hot(5, 30) r, self.categorys = m_page(T_Category, size=10) news = {} for cate in self.categorys: r, news[cate.get('listname')] = m_page( TNews, category=cate.get('listname')) self.news = news self.labels = suggest(3) r, comments = m_page(T_Comment) for c in comments: r, n = m_info(TNews, c.get('news_id')) if r and n: c['title'] = n.get('title') r, user = m_info(T_Account, c.get('author')) if r and user: c['authorname'] = user.get('nickname', user.get('username')) self.comments = comments self.render('action/news.html')
def get(self,_id): r,info = m_info(T_CATEGORY,_id) self.write(dict(status =r,data = info))
def get(self, _id): r, info = m_info(TNews, _id) self.write(dict(status=r, data=info))
def get(self,_id): r,info = m_info(T_Servercity,_id) self.write(dict(status =r,data = info))
def get(self, _id): r, info = m_info(T_CATEGORY, _id) self.write(dict(status=r, data=info))
def get(self): r, v = m_info(city.TName, self.get_argument('id')) self.write(dict(status=r, data=v))
def get(self): r,v= m_info(city.TName,self.get_argument('id')) self.write(dict(status = r, data = v))