Logo Search packages:      
Sourcecode: zope-cmfphotoalbum version File versions  Download package

__init__.py

import sys
import PhotoAlbum
from Products.CMFCore import utils, DirectoryView
from zLOG import LOG, ERROR

ADD_CONTENT_PERMISSION = 'Add portal content' # disgusting isn't it ?

bases = (PhotoAlbum.PhotoAlbum, )

this_module = sys.modules[__name__]
z_bases = utils.initializeBasesPhase1(bases, this_module)

photoalbum_globals = globals()

DirectoryView.registerDirectory('skins', globals())

from AccessControl import allow_class

from Products.CMFPlone.PloneBatch import Batch
allow_class(Batch)

# test for CMFPhoto
try:
    import Products.CMFPhoto
except ImportError, err:
    LOG('CMFPhotoAlbum', ERROR, 'CMFPhoto not installed',
    'Please install CMFPhoto from http://sourceforge.net/projects/collective/')


def initialize(registrar):
    utils.initializeBasesPhase2(z_bases, registrar)
    utils.ContentInit(
        'CMFPhotoAlbum',
        content_types = bases,
        permission = ADD_CONTENT_PERMISSION,
        extra_constructors = (PhotoAlbum.addPhotoAlbum, ),
        fti = (PhotoAlbum.factory_type_information, ),
        ).initialize(registrar)


Generated by  Doxygen 1.6.0   Back to index