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

« back to all changes in this revision

Viewing changes to ivle/webapp/admin/subject.py

  • Committer: William Grant
  • Date: 2009-12-16 03:11:37 UTC
  • mto: This revision was merged to the branch mainline in revision 1450.
  • Revision ID: me@williamgrant.id.au-20091216031137-es6d1sznu2xozylb
Add basic (ie. pretty much empty) offering index.

Show diffs side-by-side

added added

removed removed

Lines of Context:
75
75
                ctx['semesters'].append((semester, offerings))
76
76
 
77
77
 
 
78
class OfferingView(XHTMLView):
 
79
    """The home page of an offering."""
 
80
    template = 'templates/offering.html'
 
81
    tab = 'subjects'
 
82
    permission = 'view'
 
83
 
 
84
    def populate(self, req, ctx):
 
85
        ctx['context'] = self.context
 
86
        ctx['req'] = req
 
87
 
 
88
 
78
89
class UserValidator(formencode.FancyValidator):
79
90
    """A FormEncode validator that turns a username into a user.
80
91
 
245
256
    reverse_routes = (subject_url, offering_url, projectset_url, project_url)
246
257
 
247
258
    views = [(ApplicationRoot, ('subjects', '+index'), SubjectsView),
 
259
             (Offering, '+index', OfferingView),
248
260
             (Offering, ('+enrolments', '+index'), EnrolmentsView),
249
261
             (Offering, ('+enrolments', '+new'), EnrolView),
250
262
             (Offering, ('+projects', '+index'), OfferingProjectsView),