vendor/CMF/1.5.5-beta/CMFTopic

view __init__.py @ 0:4341d8feb2f9

Vendor import of CMF 1.5.5-beta
author fguillaume
date Mon, 07 Nov 2005 22:03:41 +0000
parents
children
line source
1 ##############################################################################
2 #
3 # Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
4 #
5 # This software is subject to the provisions of the Zope Public License,
6 # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
7 # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
8 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
9 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
10 # FOR A PARTICULAR PURPOSE.
11 #
12 ##############################################################################
13 """ Topic: Canned catalog queries
15 $Id: __init__.py 36457 2004-08-12 15:07:44Z jens $
16 """
18 import sys
20 from ZClasses import createZClassForBase
22 from Products.CMFCore.utils import ContentInit
23 from Products.CMFCore.DirectoryView import registerDirectory
25 import Topic
26 import SimpleStringCriterion
27 import SimpleIntCriterion
28 import ListCriterion
29 import DateCriteria
30 import SortCriterion
31 from permissions import AddTopics
34 bases = ( Topic.Topic, )
36 this_module = sys.modules[ __name__ ]
38 for base in bases:
39 createZClassForBase( base, this_module )
41 # This is used by a script (external method) that can be run
42 # to set up Topics in an existing CMF Site instance.
43 topic_globals = globals()
45 # Make the skins available as DirectoryViews
46 registerDirectory( 'skins', globals() )
48 def initialize( context ):
50 context.registerHelpTitle( 'CMF Topic Help' )
51 context.registerHelp( directory='help' )
53 # CMF Initializers
54 ContentInit( 'CMF Topic Objects'
55 , content_types = (Topic.Topic,)
56 , permission = AddTopics
57 , extra_constructors = (Topic.addTopic,)
58 , fti = Topic.factory_type_information
59 ).initialize( context )