source: WAeUP_SRP/trunk/__init__.py @ 408

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

more us changes

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