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
|
|
|
|
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
|
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
|
2011-11-28 15:50:01 -06:00
|
|
|
from AccessControl.PermissionRole import rolesForPermissionOn
|
2009-06-29 07:06:01 -05:00
|
|
|
from DateTime import DateTime
|
2010-09-02 09:16:08 -05:00
|
|
|
from Products.ExternalMethod.ExternalMethod import ExternalMethod
|
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!>]
|
|
|
|
ADD_CONTENT_PERMISSIONS = {
|
|
|
|
<!addPermissions!>}
|
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
|
|
|
# ------------------------------------------------------------------------------
|