source: waeup_product/trunk/__init__.py @ 260

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

Added tests + some more.

  • Property svn:keywords set to Id
File size: 3.4 KB
Line 
1from Testing.ZopeTestCase import installProduct
2
3installProduct('WAeUP')
4#-*- mode: python; mode: fold -*-
5# $Id: __init__.py 260 2006-06-22 12:42:52Z joachim $
6from Products.CMFCore.utils import ContentInit, ToolInit
7from Products.CMFCore.DirectoryView import registerDirectory
8from Products.CMFCore import utils as cmfutils
9from Products.CMFCore.CMFCorePermissions import AddPortalContent
10
11from Products.GenericSetup import profile_registry
12from Products.GenericSetup import EXTENSION
13
14from Products.CPSCore.interfaces import ICPSSite
15
16import Products.WAeUP.WAeUPPermissions
17from Products.WAeUP.University import University, addUniversity
18from Products.WAeUP.Accommodation import AccoFolder, addAccoFolder
19from Products.WAeUP.Accommodation import Accommodation, addAccommodation
20#from Products.WAeUP.Academics import SCFolder, addSCFolder
21from Products.WAeUP.Academics import Certificate, addCertificate
22from Products.WAeUP.Academics import CertificateCourse, addCertificateCourse
23from Products.WAeUP.Academics import Faculty, addFaculty
24from Products.WAeUP.Academics import Department, addDepartment
25from Products.WAeUP.Academics import Course, addCourse
26from Products.WAeUP.Academics import CourseTicket, addCourseTicket
27from Products.WAeUP.Academics import CertificateCourse, addCertificateCourse
28from Products.WAeUP.Students import Student, addStudent
29from Products.WAeUP.Students import StudentPersonal, addStudentPersonal
30from Products.WAeUP.Students import StudentEligibility, addStudentEligibility
31from Products.WAeUP.Students import StudentDocuments, addStudentDocuments
32from Products.WAeUP.Students import Jamb, addJamb
33from Products.WAeUP.Students import StudyLevel, addStudyLevel
34from Products.WAeUP.Students import Semester, addSemester
35
36
37import Widgets
38
39contentClasses = (
40    University,
41    #SCFolder,
42    Certificate,
43    CertificateCourse,
44    Faculty,
45    Department,
46    Course,
47    CourseTicket,
48    CertificateCourse,
49    AccoFolder,
50    Accommodation,
51    Student,
52    StudentPersonal,
53    StudentEligibility,
54    StudentDocuments,
55    Jamb,
56    StudyLevel,
57    Semester,
58    )
59
60contentConstructors = (
61    addUniversity,
62    #addSCFolder,
63    addCertificate,
64    addCertificateCourse,
65    addFaculty,
66    addDepartment,
67    addCourse,
68    addCourseTicket,
69    addCertificateCourse,
70    addAccoFolder,
71    addAccommodation,
72    addStudent,
73    addStudentPersonal,
74    addStudentEligibility,
75    addStudentDocuments,
76    addJamb,
77    addStudyLevel,
78    addSemester,
79    )
80
81fti = (
82    {}, # University
83    #{}, #SCFolder
84    {}, #Certificate
85    {}, #CertificateCourse
86    {}, # Faculty
87    {}, # Department
88    {}, # Course
89    {}, # CourseTicket
90    {}, # CertificateCourse
91    {}, # AccoFolder
92    {}, # Accommodation
93    {}, # Student,
94    {}, # StudentPersonal,
95    {}, # StudentEligibility,
96    {}, # StudentDocuments,
97    {}, # Jamb,
98    {}, # StudyLevel,
99    {}, # Semester,
100    )
101
102registerDirectory('skins', globals())
103
104def initialize(registrar):
105    ContentInit('WAeUP Types',
106                content_types = contentClasses,
107                permission = AddPortalContent,
108                extra_constructors = contentConstructors,
109                fti = fti,
110                ).initialize(registrar)
111
112    # Extension profile registration
113    profile_registry.registerProfile(
114        'default',
115        'WAeUP',
116        "The WestAfrican e-University Project",
117        'profiles/default',
118        'WAeUP',
119        EXTENSION,
120        for_=ICPSSite)
121
Note: See TracBrowser for help on using the repository browser.