# WAeUP CMS Product # Archetypes based content types for the West African e-University Project web portal # Copyright (c) 2005 WAeUP # # This program 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. # # This program 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 this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # """ $Id: $ """ __author__ = '' __docformat__ = 'restructuredtext' from StringIO import StringIO from Products.waeup_cms.config import PROJECTNAME, GLOBALS from Products.Archetypes import listTypes from Products.Archetypes.Extensions.utils import installTypes from Products.Archetypes.Extensions.utils import install_subskin from Products.CMFCore.utils import getToolByName def install(self): out = StringIO() typeInfo = listTypes(PROJECTNAME) installTypes(self, out, typeInfo, PROJECTNAME) install_subskin(self, out, GLOBALS) registerStylesheets(self, out) print >> out, 'Successfully installed %s' % PROJECTNAME return out.getvalue() def registerStylesheets(self, out): csstool = getToolByName(self, 'portal_css') csstool.registerStylesheet('waeup.css', media="all", rendering='import') print >> out, 'installed the Plone additional styles'