~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-30 08:11:33 UTC
  • mto: (1294.2.116 ui-the-third)
  • mto: This revision was merged to the branch mainline in revision 1353.
  • Revision ID: grantw@unimelb.edu.au-20090730081133-qpf554hidfzm7ogs
Router->Publisher

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
from ivle.webapp.base.plugins import ViewPlugin, PublicViewPlugin
46
46
from ivle.webapp.base.xhtml import XHTMLView, XHTMLErrorView
47
47
from ivle.webapp.errors import HTTPError, Unauthorized, NotFound
48
 
from ivle.webapp.routing import Router, RoutingError
 
48
from ivle.webapp.publisher import Publisher, PublishingError
49
49
from ivle.webapp import ApplicationRoot
50
50
 
51
51
config = ivle.config.Config()
55
55
    Build a Mapper object for doing URL matching using 'routes', based on the
56
56
    given plugin registry.
57
57
    """
58
 
    r = Router(root=root)
 
58
    r = Publisher(root=root)
59
59
 
60
60
    r.add_set_switch('api', 'api')
61
61
 
154
154
        else:
155
155
            req.store.commit()
156
156
            return req.OK
157
 
    except RoutingError, e:
 
157
    except PublishingError, e:
158
158
        if req.user.admin:
159
159
            XHTMLErrorView(req, NotFound('Not found: ' +
160
160
                                         str(e.args))).render(req)