Changeset 365

Show
Ignore:
Timestamp:
07/04/06 07:40:46
Author:
chervol
Message:

added install method

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • geolocation/trunk/adapter.py

    r364 r365  
    33from zope.app.annotation.interfaces import IAnnotations, IAnnotatable 
    44from Products.CMFPlone.CatalogTool import registerIndexableAttribute 
     5from persistent.mapping import  PersistentMapping 
    56 
    67GEOLOCATION_KEY = "geolocation.adapter" 
     
    3940    def setLocation(self, longitude, latitude): 
    4041        """ set location """ 
    41         self.geolocation['longitude'] = valu
    42         self.geolocation['latitude'] = valu
     42        self.geolocation['longitude'] = longitud
     43        self.geolocation['latitude'] = latitud
    4344         
    4445default = None 
    4546 
    4647def geoLocation(obj, portal, **kw): 
    47     """ long idx """ 
     48    """ return the location list """ 
    4849    adapter = IGEOLocated(obj, None) 
    4950    if adapter: 
    5051        return (adapter.getLongitude(), adapter.getLatitude()) 
    5152    return default 
    52  
     53""" 
    5354def Longitude(obj, portal, **kw): 
    54     """ long idx """ 
    5555    adapter = IGEOLocated(obj, None) 
    5656    if adapter: 
     
    5959 
    6060def Latitude(obj, portal, **kw): 
    61     """ lat idx """ 
    6261    adapter = IGEOLocated(obj, None) 
    6362    if adapter: 
    6463        return adapter.getLatitude() 
    6564    return default 
    66  
    67 registerIndexableAttribute('Longitude', Longitude) 
    68 registerIndexableAttribute('Latitude', Latitude) 
     65""" 
     66registerIndexableAttribute('geoLocation', geoLocation) 
     67#registerIndexableAttribute('Longitude', Longitude) 
     68#registerIndexableAttribute('Latitude', Latitude) 
  • geolocation/trunk/browser/location.py

    r364 r365  
    77# Product imports 
    88from Products.geolocation.interface import IGEOLocated, IGEOLocatedView 
    9 from zLOG import LOG 
    10 import sys, traceback 
    11 from StringIO import StringIO 
    129 
    1310class GEOLocatedView(BrowserView):