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

« back to all changes in this revision

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

  • Committer: William Grant
  • Date: 2009-03-26 08:36:00 UTC
  • mto: (1165.3.1 submissions)
  • mto: This revision was merged to the branch mainline in revision 1174.
  • Revision ID: grantw@unimelb.edu.au-20090326083600-0nywchy08dzi0us1
Add an initial project selection UI to SubmitView.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 
20
20
"""Project submissions user interface."""
21
21
 
 
22
import os.path
 
23
 
22
24
from ivle.database import (User, ProjectGroup, Offering, Subject, Semester,
23
25
                           ProjectSet)
24
26
from ivle.webapp.errors import NotFound
36
38
        # We need to work out which entity owns the repository, so we look
37
39
        # at the first two path segments. The first tells us the type.
38
40
        self.context = self.get_repository_owner(req.store, name)
 
41
        self.path = os.path.normpath(path)
39
42
 
40
43
        if self.context is None:
41
44
            raise NotFound()
45
48
        raise NotImplementedError()
46
49
 
47
50
    def populate(self, req, ctx):
48
 
        pass
 
51
        ctx['principal'] = self.context
 
52
        ctx['path'] = self.path
49
53
 
50
54
 
51
55
class UserSubmitView(SubmitView):