source: publico/ILCertificados/trunk/__init__.py @ 2674

Última Alteração nesse arquivo desde 2674 foi 2674, incluída por jeanferri, 14 anos atrás

Importação do produto de certificados on-line

File size: 3.4 KB
Linha 
1# -*- coding: utf-8 -*-
2#
3# File: ILCertificados.py
4#
5# Copyright (c) 2006 by Interlegis
6# Generator: ArchGenXML Version 1.5.0 svn/devel
7#            http://plone.org/products/archgenxml
8#
9# GNU General Public License (GPL)
10#
11# This program is free software; you can redistribute it and/or
12# modify it under the terms of the GNU General Public License
13# as published by the Free Software Foundation; either version 2
14# of the License, or (at your option) any later version.
15#
16# This program is distributed in the hope that it will be useful,
17# but WITHOUT ANY WARRANTY; without even the implied warranty of
18# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19# GNU General Public License for more details.
20#
21# You should have received a copy of the GNU General Public License
22# along with this program; if not, write to the Free Software
23# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
24# 02110-1301, USA.
25#
26
27__author__ = """STC Interlegis <admin-stc@interlegis.gov.br>"""
28__docformat__ = 'plaintext'
29
30
31# There are three ways to inject custom code here:
32#
33#   - To set global configuration variables, create a file AppConfig.py.
34#       This will be imported in config.py, which in turn is imported in
35#       each generated class and in this file.
36#   - To perform custom initialisation after types have been registered,
37#       use the protected code section at the bottom of initialize().
38#   - To register a customisation policy, create a file CustomizationPolicy.py
39#       with a method register(context) to register the policy.
40
41from zLOG import LOG, INFO, DEBUG
42
43LOG('ILCertificados', DEBUG, 'Installing Product')
44
45try:
46    import CustomizationPolicy
47except ImportError:
48    CustomizationPolicy = None
49
50from Globals import package_home
51from Products.CMFCore import utils as cmfutils
52from Products.CMFCore import CMFCorePermissions
53from Products.CMFCore import DirectoryView
54from Products.CMFPlone.PloneUtilities import ToolInit
55from Products.Archetypes.atapi import *
56from Products.Archetypes import listTypes
57from Products.Archetypes.utils import capitalize
58
59import os, os.path
60
61from Products.ILCertificados.config import *
62
63DirectoryView.registerDirectory('skins', product_globals)
64DirectoryView.registerDirectory('skins/ILCertificados',
65                                    product_globals)
66
67##code-section custom-init-head #fill in your manual code here
68##/code-section custom-init-head
69
70
71def initialize(context):
72    ##code-section custom-init-top #fill in your manual code here
73    ##/code-section custom-init-top
74
75    # imports packages and types for registration
76
77    import Certificados
78    import EventoCertificado
79    import Certificado
80    import AssinaturaCertificado
81    import TemplateCertificado
82
83    # Initialize portal content
84    content_types, constructors, ftis = process_types(
85        listTypes(PROJECTNAME),
86        PROJECTNAME)
87
88    cmfutils.ContentInit(
89        PROJECTNAME + ' Content',
90        content_types      = content_types,
91        permission         = DEFAULT_ADD_CONTENT_PERMISSION,
92        extra_constructors = constructors,
93        fti                = ftis,
94        ).initialize(context)
95
96    # Apply customization-policy, if theres any
97    if CustomizationPolicy and hasattr(CustomizationPolicy, 'register'):
98        CustomizationPolicy.register(context)
99        print 'Customization policy for ILCertificados installed'
100
101    ##code-section custom-init-bottom #fill in your manual code here
102    ##/code-section custom-init-bottom
103
Note: Veja TracBrowser para ajuda no uso do navegador do trac.
 

The contents and data of this website are published under license:
Creative Commons 4.0 Brasil - Atribuir Fonte - Compartilhar Igual.