def get(self, hid): gp, uid = is_loged(self) if gp == 't': h = get_homework(hid) comment = html2Text(h['comment']) self.render('teacher_cmt_homework.html', id=uid, active='dsh', active_slide='cmt', hid=hid, comment=comment) else: self.redirect('/404')
def get(self, infoId, *args, **kwargs): gp, uid = is_loged(self) if gp == 't': info = get_info(infoId) content = html2Text(info['detail']) title = info['title'] self.render('teacher_publish_resource.html', id=uid, active='dsh', active_slide='ntfc', r_title=title, r_content=content, act='edit') else: self.redirect('/404')