2009-06-29 07:06:01 -05:00
|
|
|
<!codeHeader!>
|
2010-08-05 11:23:17 -05:00
|
|
|
import os, os.path, sys, copy
|
|
|
|
import appy.gen
|
|
|
|
from Products.CMFCore.permissions import setDefaultRoles
|
|
|
|
import Extensions.appyWrappers as wraps
|
2009-06-29 07:06:01 -05:00
|
|
|
<!imports!>
|
2009-11-11 13:22:13 -06:00
|
|
|
|
2009-06-29 07:06:01 -05:00
|
|
|
# The following imports are here for allowing mixin classes to access those
|
|
|
|
# elements without being statically dependent on Plone/Zope packages. Indeed,
|
|
|
|
# every Archetype instance has a method "getProductConfig" that returns this
|
|
|
|
# module.
|
|
|
|
from persistent.list import PersistentList
|
2010-09-02 09:16:08 -05:00
|
|
|
from zExceptions import BadRequest
|
|
|
|
from ZPublisher.HTTPRequest import BaseRequest
|
|
|
|
try:
|
|
|
|
import CustomizationPolicy
|
|
|
|
except ImportError:
|
|
|
|
CustomizationPolicy = None
|
2009-06-29 07:06:01 -05:00
|
|
|
from OFS.Image import File
|
2010-11-26 10:30:46 -06:00
|
|
|
from ZPublisher.HTTPRequest import FileUpload
|
2011-02-01 04:09:54 -06:00
|
|
|
from AccessControl import getSecurityManager
|
2009-06-29 07:06:01 -05:00
|
|
|
from DateTime import DateTime
|
2010-09-02 09:16:08 -05:00
|
|
|
from Products.CMFCore import utils as cmfutils
|
2009-06-29 07:06:01 -05:00
|
|
|
from Products.CMFCore.utils import getToolByName
|
|
|
|
from Products.CMFPlone.PloneBatch import Batch
|
2010-09-02 09:16:08 -05:00
|
|
|
from Products.CMFPlone.utils import ToolInit
|
2011-03-03 02:55:20 -06:00
|
|
|
from Products.CMFPlone.interfaces import IPloneSiteRoot
|
2010-09-02 09:16:08 -05:00
|
|
|
from Products.CMFCore import DirectoryView
|
|
|
|
from Products.CMFCore.DirectoryView import manage_addDirectoryView
|
|
|
|
from Products.ExternalMethod.ExternalMethod import ExternalMethod
|
|
|
|
from Products.Archetypes.Extensions.utils import installTypes
|
|
|
|
from Products.Archetypes.Extensions.utils import install_subskin
|
|
|
|
from Products.Archetypes.config import TOOL_NAME as ARCHETYPETOOLNAME
|
|
|
|
from Products.Archetypes import listTypes, process_types
|
2011-03-03 02:55:20 -06:00
|
|
|
from Products.GenericSetup import EXTENSION, profile_registry
|
2011-06-10 10:20:09 -05:00
|
|
|
from Products.Transience.Transience import TransientObjectContainer
|
2010-09-02 09:16:08 -05:00
|
|
|
import appy.gen
|
2009-06-29 07:06:01 -05:00
|
|
|
import logging
|
|
|
|
logger = logging.getLogger('<!applicationName!>')
|
|
|
|
|
|
|
|
# Some global variables --------------------------------------------------------
|
2009-10-18 07:52:27 -05:00
|
|
|
PROJECTNAME = '<!applicationName!>'
|
2009-11-11 13:22:13 -06:00
|
|
|
diskFolder = os.path.dirname(<!applicationName!>.__file__)
|
2009-06-29 07:06:01 -05:00
|
|
|
defaultAddRoles = [<!defaultAddRoles!>]
|
|
|
|
DEFAULT_ADD_CONTENT_PERMISSION = "Add portal content"
|
|
|
|
ADD_CONTENT_PERMISSIONS = {
|
|
|
|
<!addPermissions!>}
|
|
|
|
setDefaultRoles(DEFAULT_ADD_CONTENT_PERMISSION, tuple(defaultAddRoles))
|
2010-09-02 09:16:08 -05:00
|
|
|
|
2010-10-14 07:43:56 -05:00
|
|
|
# Applications classes, in various formats
|
2009-10-18 07:52:27 -05:00
|
|
|
rootClasses = [<!rootClasses!>]
|
2011-01-14 02:06:25 -06:00
|
|
|
appClasses = [<!appClasses!>]
|
2010-09-02 09:16:08 -05:00
|
|
|
appClassNames = [<!appClassNames!>]
|
|
|
|
allClassNames = [<!allClassNames!>]
|
2010-08-05 11:23:17 -05:00
|
|
|
|
2010-01-06 11:36:16 -06:00
|
|
|
# In the following dict, we store, for every Appy class, the ordered list of
|
2010-08-05 11:23:17 -05:00
|
|
|
# appy types (included inherited ones).
|
2010-01-06 11:36:16 -06:00
|
|
|
attributes = {<!attributes!>}
|
2010-09-02 09:16:08 -05:00
|
|
|
|
|
|
|
# Application roles
|
|
|
|
applicationRoles = [<!roles!>]
|
|
|
|
applicationGlobalRoles = [<!gRoles!>]
|
|
|
|
grantableRoles = [<!grRoles!>]
|
|
|
|
|
|
|
|
# Configuration options
|
|
|
|
languages = [<!languages!>]
|
|
|
|
languageSelector = <!languageSelector!>
|
|
|
|
appFrontPage = <!appFrontPage!>
|
2011-01-14 02:06:25 -06:00
|
|
|
sourceLanguage = '<!sourceLanguage!>'
|
2009-06-29 07:06:01 -05:00
|
|
|
# ------------------------------------------------------------------------------
|