web.pluginmanager.disableview

Package web :: Package pluginmanager :: Module disableview |
[hide private]
[frames] | no frames]

# Source Code for Module web.pluginmanager.disableview

     1  import web
     2
     3  from decorators import i18n
     4
     5 -class DisableView:
     6      @i18n
     7 -    def GET(self, plugin_to_disable):
     8          disable_plugins = web.ctx.plugin_manager.disable_plugin(plugin_to_disable)
     9
    10          # If there isn't new disable plugins
    11          if not disable_plugins:
    12              raise web.seeother('/pluginmanager')
    13
    14          plugins_name = (p.name for p in disable_plugins)
    15          string_name = ', '.join(plugins_name)
    16
    17          web.ctx.notify(_('The next plugins has been disabled: %s'
    18              % string_name), 'notification')
    19
    20          raise web.seeother('/pluginmanager')
    21