Ver Mensaje Individual
  #1 (permalink)  
Antiguo 18/01/2011, 15:08
SamuraiBlanco
 
Fecha de Ingreso: marzo-2010
Ubicación: Mérida, Venezula
Mensajes: 73
Antigüedad: 14 años, 1 mes
Puntos: 0
Modificar el valor de una variable en un modulo

Ante todo cordial saludo estoy tratando de crear un perfil de instalación para un pequeño paquete para el CMS Plone, como sabrán el mismo y sus paquetes estan desarrollados en Python, y el problema es más con este que con el mismo CMS.
Estoy usando un desarrollo que viene de Plone que es conocido como Cynin, el cual al instalarlo en Zope cambia gran cantidad de opciones que no vienen al caso. El punto es que, al instalarlo la aplicación de instalación importa el siguiente script que es conocido como config.py que se puede ver a continuación.

Código Python:
Ver original
  1. """
  2. Contains constants used by setuphandler.py
  3. """
  4. from ubify.policy import CyninMessageFactory as _
  5. GLOBALS = globals()
  6.  
  7. PROJECTNAME = 'ubify.policy'
  8.  
  9. newgroups = ('SiteAdmins',
  10.              )
  11. siteadmingroup = "SiteAdmins"
  12. siteadmin = "siteadmin"
  13. siteadminpass = "secret"
  14. testuserpass = "secret"
  15. createtestusers = False
  16. createtestspaces = False
  17. user_my_folder_name = 'My Space'
  18. spacesdefaultaddabletypes = ('Blog',
  19.                              'Calendar',
  20.                              'FileRepository',
  21.                              'GenericContainer',
  22.                              'Folder',
  23.                              'Gallery',
  24.                              'LinkDirectory',
  25.                              'Space',
  26.                              'Topic',
  27.                              'Wiki',
  28.                              'SmartView',
  29.                              )
  30.  
  31. spacesdefaultaddablenonfolderishtypes = ('Document',
  32.                                          'Event',
  33.                                          'File',
  34.                                          'Image',
  35.                                          'Link',
  36.                                          'Blog Entry',
  37.                                          'Video',
  38.                                          'Discussion',
  39.                                          'Audio',
  40.                                          )
  41.  
  42. sitetabs = ({'id':'central',
  43.              'name':'Central',
  44.              'url_expr':'string:$portal_url/spaces/central',
  45.              'condition':'',
  46.              'permission':'',
  47.              'category':'',
  48.              'visible':True,
  49.              },
  50.             {'id':'spaces',
  51.              'name':'Spaces',
  52.              'url_expr':'string:$portal_url/spaces',
  53.              'condition':'',
  54.              'permission':'',
  55.              'category':'',
  56.              'visible':True,
  57.              },
  58.             {'id':'people',
  59.              'name':'People',
  60.              'url_expr':'string:$portal_url/Members',
  61.              'condition':'',
  62.              'permission':'',
  63.              'category':'',
  64.              'visible':True,
  65.              },
  66.             )
  67. mailhostconfiguration = {'configure':True,
  68.                          'smtphost':'localhost',
  69.                          'smtpport':25,
  70.                          'fromemailname':'Site Administrator',
  71.                          'fromemailaddress':'[email protected]'
  72.                         }
  73.  
  74. PRODUCT_DEPENDENCIES = ('Calendaring',
  75.                         'plone.app.iterate',
  76.                         'Marshall',
  77.                         'CMFPlacefulWorkflow',
  78.                         'CMFNotification',
  79.                         'ZipFileTransport',
  80.                         'Scrawl',
  81.                         'ubify.coretypes',
  82.                         'ubify.smartview',
  83.                         'ubify.spaces',
  84.                         'ubify.viewlets',
  85.                         'ubify.cyninv2theme',
  86.                         'ubify.recyclebin',
  87.                         'ubify.xmlrpc',
  88.                         'Products.OpenXml',
  89.                         'ATRatings',
  90.                         'ubify.ffxmpp',
  91.                         'cenditel.multimedia',
  92.                         )
  93.  
  94. UNINSTALL_PRODUCTS = ('PloneSlimbox',
  95.                       'PloneFlashUpload',
  96.                      )
  97.  
  98. EXTENSION_PROFILES = ('ubify.policy:default',
  99. )
  100.  
  101. ALLOWEDROLESTOADDKEYWORDS = ('Owner',
  102.                              'Editor',
  103.                              'Contributor',
  104.                             )
  105.  
  106. kuputoolbaroptions = ('bg-subsuper',
  107.                   'subscript-button',
  108.                   'superscript-button',
  109.                   'embed-tab',
  110.                   'toc-tab',
  111.                   'bg-undo',
  112.                   'undo-button',
  113.                   'redo-button',
  114.                  )
  115.  
  116. defaultlistspaceicons = (
  117.                         {'id':'aaspace-icon.png','name':'A Space',},
  118.                         {'id':'private2.png','name':'Private',},
  119.                         {'id':'workspace1.png','name':'Workspace 1',},
  120.                         {'id':'folder50.png','name':'Folder',},
  121.                         {'id':'warning2.png','name':'Warning 2',},
  122.                         {'id':'drive_graphite.png','name':'Drive graphite',},
  123.                         {'id':'sync1.png','name':'Sync 1',},
  124.                         {'id':'chat_bubble.png','name':'Chat bubble',},
  125.                         {'id':'lock1.png','name':'Lock 1',},
  126.                         {'id':'stop.png','name':'Stop',},
  127.                         {'id':'info2.png','name':'Info 2',},
  128.                         {'id':'drive_blue.png','name':'Drive blue',},
  129.                         {'id':'warning1.png','name':'Warning 1',},
  130.                         {'id':'drive_green.png','name':'Drive green',},
  131.                         {'id':'under_construction.png','name':'Under construction',},
  132.                         {'id':'space_key.png','name':'Key',},
  133.                         {'id':'question2.png','name':'Question 2',},
  134.                         {'id':'sync3.png','name':'Sync 3',},
  135.                         {'id':'workspace2.png','name':'Workspace 2',},
  136.                         {'id':'screen.png','name':'Screen',},
  137.                         {'id':'tick2.png','name':'Tick 2',},
  138.                         {'id':'drive_red.png','name':'Drive red',},
  139.                         {'id':'buddies.png','name':'Buddies',},
  140.                         {'id':'alert_bell.png','name':'Alert bell',},
  141.                         {'id':'globe.png','name':'Globe',},
  142.                         {'id':'lock2.png','name':'Lock 2',},
  143.                         {'id':'collaboration.png','name':'Collaboration',},
  144.                         {'id':'sync2.png','name':'Sync 2',},
  145.                         {'id':'star.png','name':'Star',},
  146.                         {'id':'Info1.png','name':'Info 1',},
  147.                         {'id':'question1.png','name':'Question 1',},
  148.                         {'id':'network.png','name':'Network',},
  149.                         {'id':'private1.png','name':'Private 1',},
  150.                         {'id':'hazard.png','name':'Hazard',},
  151.                         {'id':'tick1.png','name':'Tick 1',},
  152.                         {'id':'help.png','name':'Help',},
  153.                         )
  154.  
  155. custommindmapshowabletypes = ('ContentRoot',
  156.                               'SmartviewFolder',
  157.                               'ContentSpace',
  158.                               )
  159.  
  160. defaulttitles = ({'id':'spaces',
  161.                   'type':'SpacesFolder',
  162.                   'title':'spaces',
  163.                   'description':'',
  164.                  },
  165.                  {'id':'views',
  166.                   'type':'SmartviewFolder',
  167.                   'title':'views',
  168.                   'description':'',
  169.                  },
  170.                 )
  171.  
  172. defaultsmartviews = ({'id':'allitems',
  173.                       'title':'All Items',
  174.                       'description':'All content items of this site.',
  175.                       'query':{'sort_on':'modified','sort_order':'descending'}
  176.                      },
  177.                     )
  178.  
  179. default_categories = ('company assets',
  180.                         'reports',
  181.                         'collateral',
  182.                         'stock photos',
  183.                         'templates',
  184.                         'presentations',
  185.                         'catalogues',
  186.                         'minutes of meetings',
  187.                         'plans',
  188.                         'policies',
  189.                         'events',
  190.                         'article',
  191.                      )
  192. kupu_table_styles = ("fancy|Styled Table",
  193.                      "invisible|Invisible grid",
  194.                     )
  195. kupu_paragraph_styles = ("Heading|h2",
  196.                         "Subheading|h3",
  197.                         "Subheading 2|h4",
  198.                         "Subheading 3|h5",
  199.                         "Subheading 4|h6",
  200.                         "Literal|pre",
  201.                         "Discreet|p|discreet",
  202.                         "Pull-quote|div|pullquote",
  203.                         "Call-out|p|callout",
  204.                         "Block-quote|blockquote",
  205.                         "Highlight|span|visualHighlight",
  206.                         "Odd row|tr|odd",
  207.                         "Even row|tr|even",
  208.                         "Heading cell|th|",
  209.                         "Page break (print only)|div|pageBreak",
  210.                         "Clear floats|div|visualClear",
  211.                         "Notice - Attention|div|attention",
  212.                         "Notice - Yes|div|yes",
  213.                         "Notice - No|div|no",
  214.                         "Notice - Information|div|information",
  215.                         "Notice - Thumbs Up|div|thumbsup",
  216.                         "Notice - Rosette|div|rosette",
  217.                         "Notice - Idea|div|idea",
  218.                         "Notice - Smiley|div|smiley",
  219.                         "Notice - Note|div|note",
  220.                         "Notice - Warning|div|warning",
  221.                         )