Changeset 1935


Ignore:
Timestamp:
19 Jun 2007, 08:53:23 (17 years ago)
Author:
joachim
Message:

avoid clearing of portal_catalog_real

Location:
WAeUP_SRP/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/PatchCatalogToolXMLAdapter.py

    r1804 r1935  
    77    """Import the object from the DOM node.
    88    """
    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())       
    1016    if self.environ.shouldPurge():
     17        #import pdb;pdb.set_trace()
    1118        self._purgeProperties()
    1219        self._purgeObjects()
     
    2128        inds[ind.attributes.items()[1][1]] = ind.attributes.items()[0][1]
    2229        #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":
    3131        for ch in node._get_childNodes():
    3232            if ch.nodeName in ('index',):
     
    3737                    continue
    3838                new_indexes.append(iname)
     39                not_found = True
    3940            elif ch.nodeName in ('column',):
    4041                cha = ch.attributes.items()
     
    4344                    continue
    4445                new_columns.append(iname)
     46                not_found = True
    4547            else:
    4648                continue
    47             not_found = True
    48     if not_found:
     49    if not_found :
     50        self._logger.info("Catalog tool %s cleared."  % na[1][1])
    4951        self._logger.info("%s modified." % na[1][1])
    5052        self._initProperties(node)
     
    5557        #self._refreshCatalog()
    5658
    57     self._logger.info("Catalog tool %s imported."  % na[1][1])
     59    self._logger.info("Catalog tooool %s imported."  % na[1][1])
    5860   
    5961from Products.CPSCore.exportimport.catalog import CatalogToolXMLAdapter
  • WAeUP_SRP/trunk/WAeUPTables.py

    r1916 r1935  
    4646    return ob
    4747
    48 class RealCatalogTool(CatalogTool):
    49     meta_type = 'Catalog Tool Real'
    50     name = id = "portal_catalog_real"
    51 
    52 
    5348class WAeUPTable(ZCatalog): ###(
    5449
     
    146141        current = DateTime.DateTime().strftime("%d-%m-%y_%H_%M_%S")
    147142        open("%s/import/%s-%s.csv" % (i_home,self.getId(),current),"w+").write('\n'.join(csv))
    148 
    149 ###)
     143    ###)
    150144
    151145class AccommodationTable(WAeUPTable): ###(
  • WAeUP_SRP/trunk/exportimport.py

    r1625 r1935  
    125125    importWAeUPTable(site.returning_import, '', context,'returning_import')
    126126    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')
    128128
    129129from Products.CPSCore.exportimport.catalog import CatalogToolXMLAdapter
  • WAeUP_SRP/trunk/profiles/default/toolset.xml

    r1845 r1935  
    22<tool-setup>
    33 <required tool_id="portal_catalog_real"
    4            class="Products.WAeUP_SRP.WAeUPTables.RealCatalogTool"/>
     4           class="Products.CMFCore.CatalogTool.CatalogTool"/>
    55 <required tool_id="portal_accommodation"
    66           class="Products.WAeUP_SRP.WAeUPTables.AccommodationTable"/>
Note: See TracChangeset for help on using the changeset viewer.