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

Source Code for Module web.pluginmanager.uninstallview

 1  import web 
 2  from decorators import i18n 
3 4 5 -class UninstallView:
6
7 - def GET(self, name):
10 11 @i18n
12 - def POST(self, name):
13 uninstall = web.input().uninstall 14 15 disable_plugins = web.ctx.plugin_manager.disable_plugin(name) 16 plugins_name = (p.name for p in disable_plugins if not p.name == name) 17 if plugins_name: 18 string_name = ', '.join(plugins_name) 19 web.ctx.notify(_('The next plugins has been disabled: %s' 20 % string_name), 'notification') 21 22 delete_files = True if uninstall == 'A' else False 23 24 web.ctx.plugin_manager.uninstall_plugin(name, delete_files) 25 26 web.ctx.notify(_('The %s plugin has been uninstall.' % name), 27 'notification') 28 29 raise web.seeother('/pluginmanager')
30