Changeset 1935
- Timestamp:
- 19 Jun 2007, 08:53:23 (17 years ago)
- Location:
- WAeUP_SRP/trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/PatchCatalogToolXMLAdapter.py
r1804 r1935 7 7 """Import the object from the DOM node. 8 8 """ 9 #import pdb;pdb.set_trace() 9 na = node.attributes.items() 10 not_found = False 11 new_indexes = [] 12 new_columns = [] 13 meta_type = na[0][1] 14 name = na[1][1] 15 print name,meta_type,len(self.context()) 10 16 if self.environ.shouldPurge(): 17 #import pdb;pdb.set_trace() 11 18 self._purgeProperties() 12 19 self._purgeObjects() … … 21 28 inds[ind.attributes.items()[1][1]] = ind.attributes.items()[0][1] 22 29 #print ind.attributes.items() 23 #from pdb import set_trace; set_trace() 24 na = node.attributes.items() 25 not_found = True 26 new_indexes = [] 27 new_columns = [] 28 if na[0][1] in ("CMF Catalog","WAeUP Table"): 29 #print na[1][1] 30 not_found = False 30 if meta_type in ("WAeUP Table") and name != "portal_catalog_real": 31 31 for ch in node._get_childNodes(): 32 32 if ch.nodeName in ('index',): … … 37 37 continue 38 38 new_indexes.append(iname) 39 not_found = True 39 40 elif ch.nodeName in ('column',): 40 41 cha = ch.attributes.items() … … 43 44 continue 44 45 new_columns.append(iname) 46 not_found = True 45 47 else: 46 48 continue 47 not_found = True48 if not_found:49 if not_found : 50 self._logger.info("Catalog tool %s cleared." % na[1][1]) 49 51 self._logger.info("%s modified." % na[1][1]) 50 52 self._initProperties(node) … … 55 57 #self._refreshCatalog() 56 58 57 self._logger.info("Catalog too l %s imported." % na[1][1])59 self._logger.info("Catalog tooool %s imported." % na[1][1]) 58 60 59 61 from Products.CPSCore.exportimport.catalog import CatalogToolXMLAdapter -
WAeUP_SRP/trunk/WAeUPTables.py
r1916 r1935 46 46 return ob 47 47 48 class RealCatalogTool(CatalogTool):49 meta_type = 'Catalog Tool Real'50 name = id = "portal_catalog_real"51 52 53 48 class WAeUPTable(ZCatalog): ###( 54 49 … … 146 141 current = DateTime.DateTime().strftime("%d-%m-%y_%H_%M_%S") 147 142 open("%s/import/%s-%s.csv" % (i_home,self.getId(),current),"w+").write('\n'.join(csv)) 148 149 ###) 143 ###) 150 144 151 145 class AccommodationTable(WAeUPTable): ###( -
WAeUP_SRP/trunk/exportimport.py
r1625 r1935 125 125 importWAeUPTable(site.returning_import, '', context,'returning_import') 126 126 importWAeUPTable(site.results_import, '', context,'results_import') 127 importWAeUPTable(site. students_catalog, '', context,'students_catalog')127 importWAeUPTable(site.portal_catalog_real, '', context,'portal_catalog_real') 128 128 129 129 from Products.CPSCore.exportimport.catalog import CatalogToolXMLAdapter -
WAeUP_SRP/trunk/profiles/default/toolset.xml
r1845 r1935 2 2 <tool-setup> 3 3 <required tool_id="portal_catalog_real" 4 class="Products. WAeUP_SRP.WAeUPTables.RealCatalogTool"/>4 class="Products.CMFCore.CatalogTool.CatalogTool"/> 5 5 <required tool_id="portal_accommodation" 6 6 class="Products.WAeUP_SRP.WAeUPTables.AccommodationTable"/>
Note: See TracChangeset for help on using the changeset viewer.