'''This package contains base classes for wrappers that hide to the Appy
developer the real classes used by the underlying web framework.'''
# ------------------------------------------------------------------------------
import os, os.path, mimetypes
import appy.pod
from appy.gen import Field, Search, Ref, String, WorkflowAnonymous
from appy.gen.indexer import defaultIndexes
from appy.gen.utils import createObject
from appy.px import Px
from appy.shared.utils import getOsTempFolder, executeCommand, \
normalizeString, sequenceTypes
from appy.shared.xml_parser import XmlMarshaller
from appy.shared.csv_parser import CsvMarshaller
# Some error messages ----------------------------------------------------------
WRONG_FILE_TUPLE = 'This is not the way to set a file. You can specify a ' \
'2-tuple (fileName, fileContent) or a 3-tuple (fileName, fileContent, ' \
'mimeType).'
FREEZE_ERROR = 'Error while trying to freeze a "%s" file in POD field ' \
'"%s" (%s).'
FREEZE_FATAL_ERROR = 'A server error occurred. Please contact the system ' \
'administrator.'
# ------------------------------------------------------------------------------
class AbstractWrapper(object):
'''Any real Appy-managed Zope object has a companion object that is an
instance of this class.'''
# --------------------------------------------------------------------------
# Navigation-related PXs
# --------------------------------------------------------------------------
# Icon for hiding/showing details below the title.
pxShowDetails = Px('''
''')
# Displays up/down arrows in a table header column for sorting a given
# column. Requires variables "sortable", 'filterable' and 'field'.
pxSortAndFilter = Px('''
|
|
:self.pxObjectNavigate |
Made with Appy |
:self.pxMessage |
||||
|
||||
:self.pxNavigationStrip | ||||
|
||||
:self.pxFooter |
:_('object_action') | :_('object_author') | :_('action_date') | :_('action_comment') | ||||||
---|---|---|---|---|---|---|---|---|---|
|
:_(zobj.getWorkflowLabel(action)) |
|
:ztool.formatDate(event['time'], withHour=True)"> |
|
|
|
|
|
|
:self.pxTransitions |
Layouted object
''') pxView = Px('''