コード例 #1
0
 def from_dict(klas):
     args = klas
     args['direction'] = Direction.get(id=args['direction']['id'])
     args['syllabus'] = Syllabus.get(id=args['syllabus']['id'])
     args['students'] = set(map(lambda arg: Student.get(id=arg['id']), args['students']))
     return args
コード例 #2
0
ファイル: index.py プロジェクト: Web-Kevin/tor_pro
 def get(self):
     student = Student.get('name')
     self.render('user.html', student = student)
コード例 #3
0
 def from_dict(old):
     args = old
     args['student'] = Student.get(id=args['student']['id'])
     args['topic'] = Topic.get(id=args['topic']['id'])
     return args