[zopeorg-checkins] CVS: Products/Ratings/Extensions - Install.py:1.1

Kapil Thangavelu kvthan at wm.edu
Wed Jun 12 12:26:57 EDT 2002


Update of /cvs-zopeorg/Products/Ratings/Extensions
In directory cvs.zope.org:/tmp/cvs-serv25602/Extensions

Added Files:
	Install.py 
Log Message:
adding in ratings


=== Added File Products/Ratings/Extensions/Install.py ===
"""
 (C) Copyright 2002 Kapil Thangavelu <kvthan at wm.edu>
 All Rights Reserved

 This file is part of Gideon.

 Gideon is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation; either version 2 of the License, or
 (at your option) any later version.

 Gideon is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.

 You should have received a copy of the GNU General Public License
 along with Gideon; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

"""

from cStringIO import StringIO

from Products.CMFCore.utils import getToolByName

from Products.Ratings.RatingTool import RatingTool

def install(self):
    """ register the ratings tool """

    out =  []
    write = out.append

    portal_root = getToolByName(self, 'portal_url').getPortalObject()

    portal_root._setObject(RatingTool.id, RatingTool())

    #portal_root.manage_addProduct['Ratings'].manage_addTool(type='CMF Ratings Tool')

    write( ' portal ratings tool added ')
    write( ' thanks for playing ' )

    return '\n'.join(out)






More information about the zopeorg-checkins mailing list