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

« back to all changes in this revision

Viewing changes to ivle/dispatch/__init__.py

Merge from William's branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
 
51
51
config = ivle.config.Config()
52
52
 
53
 
def generate_router(view_plugins, root):
 
53
def generate_publisher(view_plugins, root):
54
54
    """
55
55
    Build a Mapper object for doing URL matching using 'routes', based on the
56
56
    given plugin registry.
104
104
    if req.publicmode:
105
105
        raise NotImplementedError("no public mode with obtrav yet!")
106
106
 
107
 
    req.router = generate_router(config.plugin_index[ViewPlugin],
 
107
    req.publisher = generate_publisher(config.plugin_index[ViewPlugin],
108
108
                                 ApplicationRoot(req.config, req.store))
109
109
 
110
110
    try:
111
 
        obj, viewcls, subpath = req.router.resolve(req.uri.decode('utf-8'))
 
111
        obj, viewcls, subpath = req.publisher.resolve(req.uri.decode('utf-8'))
112
112
        try:
113
113
            # We 404 if we have a subpath but the view forbids it.
114
114
            if not viewcls.subpath_allowed and subpath: