SubSitePetitionTool.py
"
You can customize this frontpage by clicking the edit tab on this document if you
have the correct permissions. Create folders and put content in those folders.
Folders will show up in the navigation box if they are published. It's a very
simple and powerful system.
Classes
SubSiteFolder
SubSitePetitionTool
Functions
addSubSitePetitionTool
SubSiteFolder
Derived from
Folder
Methods
__init__
getHiddenProducts
SubSiteFolder.__init__
__init__(self, id=None)
SubSiteFolder.getHiddenProducts
getHiddenProducts(self)
*
SubSitePetitionTool
Derived from
UniqueObject, ObjectManager, SimpleItem, PropertyManager
Methods
AllowPetition
AllowPetitions
RejectPetition
RejectPetitions
__init__
addAPAVH
addDN
addSubSite
confirmPetition
createPetition
createStorage
createStorages
createSubSite
getScreenshot
havePending
listPetitions
listScreenshots
listStorages
manage_afterAdd
newPetitionId
nextStorage
registerStorage
sendto
validStorages
validateDN
SubSitePetitionTool.AllowPetition
AllowPetition(self, id)
allow petition by id.
SubSitePetitionTool.AllowPetitions
AllowPetitions(self, petition=[])
allow petition by ids.
SubSitePetitionTool.RejectPetition
RejectPetition(self, id)
Reject petition by id.
SubSitePetitionTool.RejectPetitions
RejectPetitions(self, petition=[])
Reject petition by ids.
SubSitePetitionTool.__init__
__init__(self)
SubSitePetitionTool.addAPAVH
addAPAVH(self, p)
add apache virtual host setting
SubSitePetitionTool.addDN
addDN(self, dn)
add dn to dns server
SubSitePetitionTool.addSubSite
addSubSite(self, p)
add sub site in plone site
SubSitePetitionTool.confirmPetition
confirmPetition(self, checksum)
prefix:[A-J] that mapping to postfix:[1-9]
SubSitePetitionTool.createPetition
createPetition(self, name="",company="",worktitle="",zip="",address="",telno="",e_mail="",description="",domain_name="",base_name="",screenshot="",REQUEST=None)
create a petition
SubSitePetitionTool.createStorage
createStorage(self, sid="")
create a storage
SubSitePetitionTool.createStorages
createStorages(self, batch=5)
create storages
SubSitePetitionTool.createSubSite
createSubSite(self, p)
batch procedure to create sub site
SubSitePetitionTool.getScreenshot
getScreenshot(self,name)
return the image object
SubSitePetitionTool.havePending
havePending(self)
SubSitePetitionTool.listPetitions
listPetitions(self, pendingOnly=1)
returns a list of petitions
-> list of dicts with keys:(id,name,description,timestamp,status)
SubSitePetitionTool.listScreenshots
listScreenshots(self)
return the screenshots name list
SubSitePetitionTool.listStorages
listStorages(self)
returns a list of storages
-> list of dicts with keys:(id,petitionId,timestamp)
SubSitePetitionTool.manage_afterAdd
manage_afterAdd(self, item, container)
SubSitePetitionTool.newPetitionId
newPetitionId(self)
return a petition's id for createPetiton function ->
current time for second + random numeral
SubSitePetitionTool.nextStorage
nextStorage(self)
returns a storage's instance for the next valid storage
SubSitePetitionTool.registerStorage
registerStorage(self, p)
register petition id to a valid storage
SubSitePetitionTool.sendto
sendto( self, template, variables = {} )
sends a confirm mail to someone
SubSitePetitionTool.validStorages
validStorages(self)
returns info of valid storages
SubSitePetitionTool.validateDN
validateDN(self, domainName, baseName)
return none if it's unused, if not return error
*
addSubSitePetitionTool
addSubSitePetitionTool(self,REQUEST=None)
add sub site petition tool to plone site