return g.render('join_course.xhtml')
def browse_courses(request, browse_option=''):
+ #the defaults should be moved into a config file or something...
page_num = int(request.GET.get('page', 1))
count = int(request.GET.get('count', 5))
count=count)
elif browse_option == 'departments':
- paginator = Paginator(models.UserProfile.active_instructors(), count)
+ paginator = Paginator(models.Department.objects.filter(active=True), count)
- return g.render('instructors.xhtml', paginator=paginator,
+ return g.render('departments.xhtml', paginator=paginator,
page_num=page_num,
count=count)
elif browse_option == 'courses':
- paginator = Paginator(models.UserProfile.active_instructors(), count)
+ paginator = Paginator(models.Course.objects.filter(active=True), count)
- return g.render('instructors.xhtml', paginator=paginator,
+ return g.render('courses.xhtml', paginator=paginator,
page_num=page_num,
count=count)
"""Display a heading. Show the subitems for this heading."""
return g.render('item_heading_detail.xhtml', item=item)
-
def normalize_query(query_string,
findterms=re.compile(r'"([^"]+)"|(\S+)').findall,
normspace=re.compile(r'\s{2,}').sub):
probably a more elegant way of detecting whether we are on
the front page but this works for the short term
-->
- <span py:if="not request.META.PATH_INFO == '/syrup/'">
+ <span py:if="not user.is_authenticated() and not request.META.PATH_INFO == '/syrup/'">
<a href="/syrup">Start Over</a> -
</span>
Syrup is a subproject of <a href="http://conifer.mcmaster.ca/">Project Conifer</a> © 2008