'''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.''' # Buttons for going to next/previous objects if this one is among bunch of # referenced or searched objects. currentNumber starts with 1. pxNavigateSiblings = Px('''
''') pxNavigationStrip = Px('''
|
:obj.pxNavigateSiblings |
:tool.pxMessage |
||||
|
||||
:obj.pxNavigationStrip | ||||
|
||||
:tool.pxFooter |
:_('object_action') | :_('object_author') | :_('action_date') | :_('action_comment') | ||||||
---|---|---|---|---|---|---|---|---|---|
|
:_(zobj.getWorkflowLabel(action)) |
|
:ztool.formatDate(event['time'], withHour=True) |
|
|
|
|
|
|
:obj.pxTransitions |
:field.pxView | :field.pxRender |