def from_dict(old): args = old args['klas'] = Klas.get(id=args['klas']['id']) args['syllabus'] = Syllabus.get(id=args['syllabus']['id']) args['subject'] = Subject.get(id=args['subject']['id']) args['teacher'] = Teacher.get(id=args['teacher']['id']) args['subtheme'] = Subtheme.get(id=args['subtheme']['id']) return args
def from_dict(old): args = old args['studying'] = Studying.get(id=args['studying']['id']) args['teacher'] = Teacher.get(id=args['teacher']['id']) return args