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

« back to all changes in this revision

Viewing changes to ivle/dispatch/__init__.py

Merge from object-publishing.

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
        req.status = 404
159
159
 
160
160
        if req.user.admin: