products/CpsDemoPortal

view __init__.py @ 0:ca2d7838c01c

First import
author M.-A. Darche <ma.darche@aful.org>
date Sun, 12 Dec 2010 20:41:12 +0000
parents
children
line source
1 # (C) Copyright 2010 CPS-CMS community <http://cps-cms.org/>
2 # Authors:
3 # M.-A. Darche <cps@cynode.org>
4 #
5 # This program is free software: you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation, either version 2 of the License, or
8 # (at your option) any later version.
9 #
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with this program. If not, see <http://www.gnu.org/licenses/>.
17 """ Init """
19 from Products.CMFCore.DirectoryView import registerDirectory
21 from Products.GenericSetup import profile_registry
22 from Products.GenericSetup import EXTENSION
24 from Products.CPSDefault.Portal import CPSDefaultSite
26 from Products.CPSCore.interfaces import ICPSSite
28 registerDirectory('skins', globals())
30 import factory
32 class CpsDemoPortal(CPSDefaultSite):
33 """ Just a marker.
35 I'd rather add constructors to CPSDefault. Don't know if it'd work"""
36 meta_type = 'CPS Demo Portal'
38 def initialize(registrar):
39 profile_registry.registerProfile(
40 'default',
41 "cps-cms.org look and feel",
42 "CPS demo portal extension profile",
43 'profiles/default',
44 'CpsDemoPortal',
45 EXTENSION,
46 for_=ICPSSite)
48 registrar.registerClass(CpsDemoPortal,
49 constructors=(factory.addConfiguredCpsDemoPortalForm,
50 factory.addConfiguredCpsDemoPortal))