Back to index

plone3  3.1.7
Classes | Functions | Variables
PortalTransforms.utils Namespace Reference

Classes

class  TransformException

Functions

def log
def safeToInt

Variables

tuple STRING_TYPES = (UnicodeType, StringType)
 FB_REGISTRY = None
tuple logger = logging.getLogger('PortalTransforms')
tuple _www = os.path.join(os.path.dirname(__file__), 'www')
tuple skins_dir = os.path.join(os.path.dirname(__file__), 'skins')

Detailed Description

some common utilities

Class Documentation

class PortalTransforms::utils::TransformException

Definition at line 8 of file utils.py.


Function Documentation

def PortalTransforms.utils.log (   message,
  severity = logging.INFO 
)

Definition at line 16 of file utils.py.

00016 
00017 def log(message, severity=logging.INFO):
00018     logger.log(severity, message)
00019 
# directory where template for the ZMI are located
Convert value to integer or just return 0 if we can't

Definition at line 29 of file utils.py.

00029 
00030 def safeToInt(value):
00031     """Convert value to integer or just return 0 if we can't"""
00032     try:
00033         return int(value)
00034     except ValueError:
00035         return 0
00036     except TypeError:
00037         return 0

Variable Documentation

tuple PortalTransforms.utils._www = os.path.join(os.path.dirname(__file__), 'www')

Definition at line 21 of file utils.py.

Definition at line 11 of file utils.py.

tuple PortalTransforms.utils.logger = logging.getLogger('PortalTransforms')

Definition at line 14 of file utils.py.

PortalTransforms.utils.skins_dir = os.path.join(os.path.dirname(__file__), 'skins')

Definition at line 22 of file utils.py.

tuple PortalTransforms.utils.STRING_TYPES = (UnicodeType, StringType)

Definition at line 6 of file utils.py.