~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to ivle/webapp/groups/__init__.py

  • Committer: William Grant
  • Date: 2009-02-27 05:07:09 UTC
  • Revision ID: grantw@unimelb.edu.au-20090227050709-k16kvhyl50nzjbwm
Subject URLs now contain the short name (eg. info1) rather than the code
(eg. 600151).

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
 
26
26
from ivle.webapp.base.plugins import ViewPlugin, MediaPlugin
27
27
from ivle.webapp.base.xhtml import XHTMLView
 
28
from ivle.webapp.errors import NotFound
28
29
 
29
30
class GroupsView(XHTMLView):
30
31
    """
38
39
        """Find the given offering by subject, year and semester."""
39
40
        self.context = req.store.find(Offering,
40
41
            Offering.subject_id == Subject.id,
41
 
            Subject.code == subject,
 
42
            Subject.short_name == subject,
42
43
            Offering.semester_id == Semester.id,
43
44
            Semester.year == year,
44
45
            Semester.semester == semester).one()