def instructor_url(instructor, suffix=''):
return '/syrup/instructor/%d/%s' % (instructor.id, suffix)
+# added to make department browse
+def department_url(department, suffix=''):
+ return '/syrup/department/%d/%s' % (department.id, suffix)
+
def call_or_value(obj, dflt=None):
# This is used by the generics templates.
(r'^opencourse/$', 'open_courses'),
(r'^search/$', 'search'),
(r'^instructors/$', 'instructors'),
+ (r'^departments/$', 'departments'),
(r'^course/(?P<course_id>\d+)/$', 'course_detail'),
(r'^instructor/(?P<instructor_id>.*)/$', 'instructor_detail'),
(r'^department/(?P<department_id>.*)/$', 'department_detail'),
<h2>Choose from one of the options below:</h2>
<ul>
<li><a href="courses">Browse by Course Name</a></li>
- <li><a style="text-decoration: line-through;"
- href="instructors">Browse by Instructor</a> (not working yet)</li>
- <li><a style="text-decoration: line-through;"
- href="#departments">Browse by Department</a> (not working yet)</li>
+ <li><a
+ href="instructors">Browse by Instructor</a></li>
+ <li><a
+ href="departments">Browse by Department</a></li>
</ul>
<div class="gap"/>
</body>