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

« back to all changes in this revision

Viewing changes to ivle/dispatch/__init__.py

  • Committer: William Grant
  • Date: 2009-07-04 13:05:56 UTC
  • mto: (1294.4.2 ui-the-third)
  • mto: This revision was merged to the branch mainline in revision 1353.
  • Revision ID: grantw@unimelb.edu.au-20090704130556-rwpn6d8t6az3tugt
Implement optional view subpath support.

Show diffs side-by-side

added added

removed removed

Lines of Context:
98
98
    try:
99
99
        obj, viewcls, subpath = req.router.resolve(req.uri.decode('utf-8'))
100
100
        try:
 
101
            # We 404 if we have a subpath but the view forbids it.
 
102
            if not viewcls.subpath_allowed and subpath:
 
103
                raise NotFound()
 
104
 
101
105
            # Instantiate the view, which should be a BaseView class
102
 
            view = viewcls(req, obj)
 
106
            view = viewcls(req, obj, subpath)
103
107
 
104
108
            # Check that the request (mainly the user) is permitted to access
105
109
            # the view.