def get(self): if self.request.path.endswith('.json'): self.write( self.macro('admin_widgets.html').classes_table( ctrl.get_all_classes(), ajax=True)) else: self.render('admin_classes.html', classes=ctrl.get_all_classes())
def get(self, aid): article = ctrl.get_article(aid, need_md=True) if article is None: self.redirect('/404') else: self.render('admin_editor.html', article=article, classes=ctrl.get_all_classes())
def get(self, cid=None, page_num=None): if cid is None: # 归档首页 self.render('archives.html', classes=ctrl.get_all_classes()) else: app = g.kv.get(settings.K_SITE_INFO)['app'] if page_num is None: page_num = 1 page_num = int(page_num) offset = (page_num - 1) * app self.render('archives.html', articles=ctrl.get_all_articles( offset=offset, limit=app, need_abs=True, cid=cid), page_num=page_num, app=app, cid=cid)
def get(self): self.write(self.macro('admin_widgets.html').classes_select( ctrl.get_all_classes(), ajax=True))
def get(self): self.render('admin_add_article.html', classes=ctrl.get_all_classes())
def get(self): if self.request.path.endswith('.json'): self.write(self.macro('admin_widgets.html').classes_table( ctrl.get_all_classes(), ajax=True)) else: self.render('admin_classes.html', classes=ctrl.get_all_classes())
def get(self): self.write( self.macro('admin_widgets.html').classes_select( ctrl.get_all_classes(), ajax=True))