def coursehistories(self): return [CourseHistory(pcr(middle=ch['path'])) for ch in self.raw['histories']]
def instructors(self): middle = ''.join(('course/',str(self.id),'/sections')) sections = pcr(middle=middle)['values'] return [instructor['name'] for section in sections for instructor in section['instructors']]
def courses(self): return [Course(pcr(middle=''.join(('course/',str(rawcourse['id']))))) for rawcourse in self.raw['courses']]
def department(request, dept): d = Department(pcr("".join(("dept/", dept)))) return render_to_response("department.html", {"c": d.coursehistories})