Back to index

plone3  3.1.7
registration.py
Go to the documentation of this file.
00001 from wicked.registration import SelectiveRegistration
00002 from Products.ATContentTypes.interface import IATNewsItem, IATEvent, IATDocument
00003 
00004 def document_reg(site):
00005     return SelectiveRegistration(site, content=IATDocument)
00006 document_reg.interface = IATDocument
00007 document_reg.type = "Page"
00008 document_reg.type_id = "Document"
00009 
00010 def newsitem_reg(site):
00011     return SelectiveRegistration(site, content=IATNewsItem)
00012 newsitem_reg.interface = IATNewsItem
00013 newsitem_reg.type = "NewsItem"
00014 newsitem_reg.type_id = "News Item"
00015 
00016 def event_reg(site):
00017     return SelectiveRegistration(site, content=IATEvent)
00018 event_reg.interface = IATEvent
00019 event_reg.type = "Event"
00020 event_reg.type_id = "Event"
00021 
00022 basic_type_regs = document_reg, event_reg, newsitem_reg