Conjunto de mudanças 5354 no repositório publico
- Timestamp:
- 12/10/2011 21:46:30 (9 anos atrás)
- Arquivo:
-
- 1 editado
Legenda:
- Não Modificado
- Adicionado
- Removido
-
il.spdo/trunk/il/spdo/setuphandlers.py
r5327 r5354 1 from StringIO import StringIO 2 3 from Products.PlonePAS.Extensions.Install import \ 4 activatePluginInterfaces 5 6 from il.spdo.pas import SPDOPASPlugin 7 8 def installPASPlugin(portal, name='spdo_plugin'): 9 out=StringIO() 10 acl = portal['acl_users'] 11 if name not in acl: 12 plugin = SPDOPASPlugin(name, title="SPDO PAS Plugin") 13 acl[name] = plugin 14 activatePluginInterfaces(portal, name, out) 15 plugins = acl['plugins'] 16 for info in plugins.listPluginTypeInfo(): 17 interface = info['interface'] 18 if plugin.testImplements(interface): 19 active = list(plugins.listPluginIds(interface)) 20 if name in active: 21 active.remove(name) 22 active.insert(0, name) 23 plugins._plugins[interface] = tuple(active) 24 return out.getvalue() 25 1 26 def setupVarious(context): 2 27 … … 10 35 11 36 # Add additional setup code here 37 portal = context.getSite() 38 installPASPlugin(portal)
Note: Veja
TracChangeset
para ajuda no uso do visualizador de conjunto de mudanças.