[zopeorg-checkins] CVS: Products/DateIndexes - __init__.py:1.3 RSCatalogTool.py:NONE
Martijn Pieters
mj at zope.com
Mon Mar 11 14:02:23 EST 2002
Update of /cvs-zopeorg/Products/DateIndexes
In directory cvs.zope.org:/tmp/cvs-serv2991
Modified Files:
__init__.py
Removed Files:
RSCatalogTool.py
Log Message:
Split out CMF specific stuff into a seperate package
- Remove RSCatalog tool
- Remove DublinCore monkey patch
=== Products/DateIndexes/__init__.py 1.2 => 1.3 ===
import DateRangeIndex
import DateIndex
-import RSCatalogTool
-import Products.CMFCore.utils
-
-from Products.CMFDefault.DublinCore import DefaultDublinCoreImpl
from DateTime.DateTime import DateTime
DRI_CTORS = ( ( 'manage_addDateRangeIndexForm'
@@ -17,35 +13,6 @@
, DateRangeIndex.addDateRangeIndex
)
-tools = ( RSCatalogTool.RSCatalogTool
- ,
- )
-
-def better_effective( true_self ):
- """
- Fix DublinCore element to return 'None' properly.
- """
- marker = []
- date = getattr( true_self, 'effective_date', marker )
-
- if type( date ) == type( '' ):
- try:
- date = DateTime( date )
- except:
- date = None
-
- if date is marker:
- date = getattr( true_self, 'creation_date', None )
-
- return date
-
-def better_expires( true_self ):
- """
- Fix DublinCore element to return 'None' properly.
- """
- return getattr( true_self, 'expiration_date', None )
-
-
def initialize( context ):
context.registerClass( DateRangeIndex.DateRangeIndex
@@ -61,12 +28,3 @@
)
, icon='www/index.gif'
)
-
- Products.CMFCore.utils.ToolInit( 'DateRangeIndex Tool'
- , tools=tools
- , product_name='DateIndexes'
- , icon='tool.gif'
- ).initialize( context )
-
- DefaultDublinCoreImpl.effective = better_effective
- DefaultDublinCoreImpl.expires = better_expires
=== Removed File Products/DateIndexes/RSCatalogTool.py ===
More information about the zopeorg-checkins
mailing list