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

« back to all changes in this revision

Viewing changes to ivle/webapp/media.py

Move the plugin loading/indexing logic into ivle.config.Config.
Also eliminate plugins_HACK, looking in a configuration file instead.

req.config is now set to a Config instance, and things that need to look
at plugins ask it.

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
    be generated.
42
42
    '''
43
43
    if not isinstance(plugin, basestring):
44
 
        plugin = req.reverse_plugins[plugin]
 
44
        plugin = req.config.reverse_plugins[plugin]
45
45
 
46
46
    config = Config()
47
47
 
103
103
 
104
104
    def _make_filename(self, req):
105
105
        try:
106
 
            plugin = req.plugins[self.ns]
 
106
            plugin = req.config.plugins[self.ns]
107
107
        except KeyError:
108
108
            raise NotFound()
109
109