Exemplo n.º 1
0
Arquivo: site.py Projeto: dbaty/Petrel
 def __init__(self):
     from petrel.auth import create_user_db # FIXME: not nice but ok
     Folder.__init__(self)
     create_catalog_tools(self)
     create_user_db(self)
     self.title = u'Site'
     self.description = u'A site.'
Exemplo n.º 2
0
 def _make_folder(self, parent=None):
     from petrel.content.folder import Folder
     folder = Folder()
     folder.title = u'Folder'
     if parent is None:
         parent = self.site
     parent.add(self.config.registry, 'folder', folder)
     return folder
Exemplo n.º 3
0
 def _make_folder(self, folder_id, parent=None):
     from petrel.content.folder import Folder
     folder = Folder()
     folder.title = folder_id
     if parent is None:
         parent = self.site
     parent.add(folder_id, folder)
     return folder
Exemplo n.º 4
0
 def _make_folder(self, parent, name):
     from petrel.content.folder import Folder
     folder = Folder()
     folder.id = name ## FIXME: is this needed?
     parent.add(self.config.registry, name, folder)
     return folder