2009-06-29 07:06:01 -05:00
|
|
|
<!codeHeader!>
|
2010-08-05 11:23:17 -05:00
|
|
|
import os, os.path, sys, copy
|
2011-12-05 11:15:45 -06:00
|
|
|
import appy
|
2010-08-05 11:23:17 -05:00
|
|
|
import appy.gen
|
2011-12-05 03:52:18 -06:00
|
|
|
import wrappers
|
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
|
2011-12-05 08:11:29 -06:00
|
|
|
# elements without being statically dependent on Zope packages.
|
2009-06-29 07:06:01 -05:00
|
|
|
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!>
|
2011-01-14 02:06:25 -06:00
|
|
|
sourceLanguage = '<!sourceLanguage!>'
|
2012-07-27 04:01:35 -05:00
|
|
|
activateForgotPassword = <!activateForgotPassword!>
|
2012-12-15 16:36:56 -06:00
|
|
|
enableSessionTimeout = <!enableSessionTimeout!>
|
2012-07-26 10:22:22 -05:00
|
|
|
ogone = <!ogone!>
|
2011-12-05 11:15:45 -06:00
|
|
|
|
|
|
|
# When Zope is starting or runs in test mode, there is no request object. We
|
|
|
|
# create here a fake one for storing Appy wrappers.
|
|
|
|
fakeRequest = appy.Object()
|
2009-06-29 07:06:01 -05:00
|
|
|
# ------------------------------------------------------------------------------
|