source: WAeUP_SRP/trunk/__init__.py @ 447

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

Catalog Importer does not reindex portal_catalog if no new columns or
indexes in catalog.xml

  • Property svn:keywords set to Id
File size: 4.2 KB
RevLine 
[199]1#-*- mode: python; mode: fold -*-
[204]2# $Id: __init__.py 445 2006-08-29 16:50:07Z 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
[445]15import PatchCatalogToolXMLAdapter
[263]16
[274]17import Products.WAeUP_SRP.WAeUPPermissions
[278]18from Products.WAeUP_SRP.Academics import AcademicsFolder, addAcademicsFolder
[274]19from Products.WAeUP_SRP.University import University, addUniversity
20from Products.WAeUP_SRP.Accommodation import AccoFolder, addAccoFolder
21from Products.WAeUP_SRP.Accommodation import Accommodation, addAccommodation
22from Products.WAeUP_SRP.Academics import Certificate, addCertificate
23from Products.WAeUP_SRP.Academics import CertificateCourse, addCertificateCourse
24from Products.WAeUP_SRP.Academics import Faculty, addFaculty
25from Products.WAeUP_SRP.Academics import Department, addDepartment
26from Products.WAeUP_SRP.Academics import Course, addCourse
27from Products.WAeUP_SRP.Academics import CourseTicket, addCourseTicket
28from Products.WAeUP_SRP.Academics import CertificateCourse, addCertificateCourse
[361]29from Products.WAeUP_SRP.Students import StudentsFolder, addStudentsFolder
[274]30from Products.WAeUP_SRP.Students import Student, addStudent
[362]31from Products.WAeUP_SRP.Students import StudentStudyCourse, addStudentStudyCourse
[423]32from Products.WAeUP_SRP.Students import StudentAdmission, addStudentAdmission
33from Products.WAeUP_SRP.Students import StudentClearance, addStudentClearance
[274]34from Products.WAeUP_SRP.Students import StudentPersonal, addStudentPersonal
[440]35from Products.WAeUP_SRP.Students import ScratchCardBatch, addScratchCardBatch
36from Products.WAeUP_SRP.Students import ScratchCardBatchesFolder, addScratchCardBatchesFolder
[274]37from Products.WAeUP_SRP.Students import StudyLevel, addStudyLevel
38from Products.WAeUP_SRP.Students import Semester, addSemester
[200]39
40
[59]41import Widgets
[19]42
[200]43contentClasses = (
44    University,
[278]45    AcademicsFolder,
[256]46    Certificate,
47    CertificateCourse,
[200]48    Faculty,
49    Department,
50    Course,
51    CourseTicket,
[256]52    CertificateCourse,
[200]53    AccoFolder,
54    Accommodation,
[361]55    StudentsFolder,
[200]56    Student,
[362]57    StudentStudyCourse,
[423]58    StudentAdmission,
59    StudentClearance,
[200]60    StudentPersonal,
[440]61    ScratchCardBatch,
62    ScratchCardBatchesFolder,
[200]63    StudyLevel,
64    Semester,
65    )
66
67contentConstructors = (
68    addUniversity,
[278]69    addAcademicsFolder,
[256]70    addCertificate,
71    addCertificateCourse,
[200]72    addFaculty,
73    addDepartment,
74    addCourse,
75    addCourseTicket,
[256]76    addCertificateCourse,
[200]77    addAccoFolder,
78    addAccommodation,
[361]79    addStudentsFolder,
[200]80    addStudent,
[362]81    addStudentStudyCourse,
[423]82    addStudentAdmission,
83    addStudentClearance,
[200]84    addStudentPersonal,
[440]85    addScratchCardBatch,
86    addScratchCardBatchesFolder,
[200]87    addStudyLevel,
88    addSemester,
89    )
90
[440]91fti = [{} for t in range(len(contentConstructors))]
92##fti = (
93##    {}, # University
94##    {}, #AcademicsFolder
95##    {}, #Certificate
96##    {}, #CertificateCourse
97##    {}, # Faculty
98##    {}, # Department
99##    {}, # Course
100##    {}, # CourseTicket
101##    {}, # CertificateCourse
102##    {}, # AccoFolder
103##    {}, # Accommodation
104##    {}, # StudentsFolder,
105##    {}, # Student,
106##    {}, # StudentStudyCourse,
107##    {}, # StudentAdmission,
108##    {}, # StudentClearance,
109##    {}, # StudentAdmission,
110##    {}, # StudentClearance,
111##    {}, # StudentPersonal,
112##    {}, # ScratchCardBatch,
113##    {}, # ScratchCardBatchesFolder,
114##    {}, # StudyLevel,
115##    {}, # Semester,
116##    )
[200]117
[199]118registerDirectory('skins', globals())
[197]119
[199]120def initialize(registrar):
[200]121    ContentInit('WAeUP Types',
122                content_types = contentClasses,
123                permission = AddPortalContent,
124                extra_constructors = contentConstructors,
125                fti = fti,
126                ).initialize(registrar)
127
[199]128    # Extension profile registration
129    profile_registry.registerProfile(
130        'default',
[274]131        'WAeUP_SRP',
[199]132        "The WestAfrican e-University Project",
133        'profiles/default',
[274]134        'WAeUP_SRP',
[199]135        EXTENSION,
136        for_=ICPSSite)
[84]137
Note: See TracBrowser for help on using the repository browser.