def course_feature(section, feature): course = Course.find(section) template_url = '{feature}.html'.format(feature=feature) return render_template(template_url, course=course)
def course(section): course = Course.find(section) if current_user.role == 'student': return render_template('course_student.html', course=course) else: return render_template('course_instructor.html', course=course)