Ignore:
Timestamp:
19 Dec 2008, 15:44:45 (16 years ago)
Author:
Henrik Bettermann
Message:

implement configuration object (step 1)

Configuration file must be created with create_configuration_file.py

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/WAeUPTool.py

    r3817 r3824  
    18821882                open(filename,"wb").write(str(image.data))
    18831883    ###)
     1884   
     1885   
     1886    security.declarePublic('getConfigParams')
     1887    def getConfigParams(self,conf_id="configuration"):
     1888        conf = getattr(self.portal_url.getPortalObject().campus,conf_id)
     1889        conf_obj = conf.getContent()
     1890        stool = getToolByName(self, 'portal_schemas')
     1891        schema = stool._getOb('configuration')
     1892        d = {}
     1893        for key in schema.keys():
     1894            d[key] = getattr(conf_obj,key,None)
     1895        return d
     1896
    18841897
    18851898InitializeClass(WAeUPTool)
Note: See TracChangeset for help on using the changeset viewer.