source: WAeUP_SRP/trunk/__init__.py @ 466

Last change on this file since 466 was 464, checked in by joachim, 18 years ago

added missing files.

A trunk/profiles/default/layouts/student_check_pin.xml
M trunk/profiles/default/types.xml
M trunk/profiles/default/actionicons.xml
M trunk/profiles/default/workflows.xml
A trunk/profiles/default/types/StudentSemester.xml
D trunk/profiles/default/types/CourseTicket.xml
M trunk/profiles/default/types/StudentsFolder.xml
A trunk/profiles/default/types/StudentCourseResult.xml
M trunk/init.py
M trunk/skins/waeup_academics/academics_content_lib_info_detail_tab.pt
A trunk/skins/waeup_custom/cpsskins_lib.pt
M trunk/skins/waeup_custom/getContentInfo.py
M trunk/Students.py

  • Property svn:keywords set to Id
File size: 2.4 KB
Line 
1#-*- mode: python; mode: fold -*-
2# $Id: __init__.py 464 2006-09-01 17:16:18Z joachim $
3from Products.CMFCore.utils import ContentInit, ToolInit
4from Products.CMFCore.DirectoryView import registerDirectory
5from Products.CMFCore import utils as cmfutils
6from Products.CMFCore.permissions import AddPortalContent
7
8from Products.GenericSetup import profile_registry
9from Products.GenericSetup import EXTENSION
10
11from Products.CPSCore.interfaces import ICPSSite
12
13# Only for CPS 3.4.1. In 3.4.2 and later this should be fixed.
14import PatchCPSDefaultImportExport
15import PatchCatalogToolXMLAdapter
16
17import Products.WAeUP_SRP.WAeUPPermissions
18
19import Widgets
20
21waeup_types = (
22    ("University",('University',)),
23    ("Academics",
24       ("AcademicsFolder",
25        "Certificate",
26        "CertificateCourse",
27        "Faculty",
28        "Department",
29        "Course",
30        "CertificateCourse",
31        )
32     ),
33     ("Accommodation",
34        ("AccoFolder",
35         "Accommodation",
36         )
37     ),
38     ("Students",
39        ("StudentsFolder",
40         "Student",
41         "StudentStudyCourse",
42         "StudentCourseResult",
43         "StudentAdmission",
44         "StudentClearance",
45         "StudentPersonal",
46         "ScratchCardBatch",
47         "ScratchCardBatchesFolder",
48         "StudentStudyLevel",
49         "StudentSemester",
50         # move to Academics later
51         "StudyLevel",
52         "Semester",
53         )
54      ),
55    )
56
57contentClasses = []
58cc = []
59for modu,names in waeup_types:
60    mod = __import__('Products.WAeUP_SRP.%(modu)s' % vars(),
61                globals(),
62                locals(),
63                ['*',]
64                )
65    for name in names:
66        #print name
67        contentClasses.append(getattr(mod,name))
68        cc.append(getattr(mod,"add%(name)s" % vars()))
69contentConstructors = tuple(cc)
70
71fti = [{} for t in range(len(contentConstructors))]
72
73registerDirectory('skins', globals())
74
75def initialize(registrar):
76    ContentInit('WAeUP Types',
77                content_types = contentClasses,
78                permission = AddPortalContent,
79                extra_constructors = contentConstructors,
80                fti = fti,
81                ).initialize(registrar)
82
83    # Extension profile registration
84    profile_registry.registerProfile(
85        'default',
86        'WAeUP_SRP',
87        "The WestAfrican e-University Project",
88        'profiles/default',
89        'WAeUP_SRP',
90        EXTENSION,
91        for_=ICPSSite)
92
Note: See TracBrowser for help on using the repository browser.