File: __init__.py

package info (click to toggle)
zope-atseng 0.3.2-3
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 312 kB
  • ctags: 223
  • sloc: python: 1,301; makefile: 32; sh: 5
file content (53 lines) | stat: -rw-r--r-- 1,487 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# -*- coding: iso-8859-1 -*-

"""
ATSchemaEditorNG

(C) 2003,2004, Andreas Jung, ZOPYX Software Development and Consulting
and Contributors
D-72070 T´┐Żbingen, Germany

Contact: andreas@andreas-jung.com

License: see LICENSE.txt

$Id: __init__.py 977 2004-12-28 10:50:15Z ajung $
"""

from Products.CMFCore.DirectoryView import registerDirectory
from config import SKINS_DIR, GLOBALS

registerDirectory(SKINS_DIR, GLOBALS)

# make refresh possible
from SchemaEditor import SchemaEditor
from ParentManagedSchema import ParentManagedSchema

import Products.CMFCore
from Products.Archetypes import process_types
from Products.Archetypes.public import listTypes
from config import *
from Products.CMFCore.CMFCorePermissions import AddPortalContent 

def initialize(context):
    import examples.content
    content_types, constructors, ftis = process_types(listTypes(PKG_NAME),
                                                      PKG_NAME)

    import SchemaEditorTool as SET

    context.registerClass( 
        SET.SchemaEditorTool,
        permission='Add SchemaEditorTool', 
        constructors=(SET.manage_addSchemaEditorToolForm, SET.manage_addSchemaEditorTool),
        icon='www/index.gif'
        )

    Products.CMFCore.utils.ContentInit(
        '%s Example Content' % PKG_NAME,
        content_types      = content_types,
        permission         = AddPortalContent,
        extra_constructors = constructors,
        fti                = ftis,
        ).initialize(context)