def get(self): gp, uid = is_loged(self) if gp == 't': self.render('teacher_edit_course.html', id=uid, active='dsh', active_slide='mycourse', course=get_teacher_course(uid), delete=get_teacher_course_delete(uid)) else: self.redirect('/404')
def get(self, *args, **kwargs): gp, uid = is_loged(self) if gp == 's': self.render('stu_index.html', id=uid, active='dsh', active_slide='mcs', course=get_student_course(uid)) elif gp == 't': self.render('teacher_index.html', id=uid, active='dsh', active_slide='mycourse', course=get_teacher_course(uid)) else: self.redirect('/404')