|
getPRODUCT_HOME(self)
Returns home-folder of this Product. |
|
|
object
|
createBlobInContext(self,
id,
blob,
container)
Creates a new Zope native-representative (Image/File) of given blob
in container. |
|
|
MyFile
|
FileFromData(self,
data,
filename='',
content_type=None)
Creates a new instance of a file from given data. |
|
|
MyImage
|
ImageFromData(self,
data,
filename='',
content_type=None)
Creates a new instance of an image from given data. |
|
|
|
inline_if(self,
cond,
v1,
v2)
Inline conditional:
- Java: cond?v1:v2
- Python >2.5: v1 if cond else v2 |
|
|
any
|
nvl(self,
a1,
a2,
n=None)
Returns its first argument if it is not equal to third argument
(None), otherwise it returns its second argument. |
|
|
int
|
boolint(self,
v)
Returns int (0/1) for Boolean Type new in Python 2.3. |
|
|
any
|
dt_html(self,
value,
REQUEST)
Execute given DTML-snippet. |
|
|
list
|
|
string
|
|
string
|
encrypt_ordtype(self,
s)
Encrypts given string with entities by random algorithm. |
|
|
int
|
rand_int(self,
n)
Random integer in given range. |
|
|
string
|
string_maxlen(self,
s,
maxlen=20,
etc='...',
encoding=None)
Returns string with specified maximum-length. |
|
|
string
|
url_quote(self,
string,
safe='/')
Replace special characters in string using the %xx escape. |
|
|
|
http_import(self,
url,
method='GET',
auth=None,
parse_qs=0) |
|
|
string
|
url_append_params(self,
url,
dict,
sep='&')
Append params from dict to given url. |
|
|
string
|
url_inherit_params(self,
url,
REQUEST,
exclude=[],
sep='&')
Inerits params from request to given url. |
|
|
string
|
id_quote(self,
s)
Converts given string to identifier (removes special-characters and
replaces German umlauts). |
|
|
string
|
get_id_prefix(self,
s)
Returns prefix from identifier (which is the non-numeric part at the
beginning). |
|
|
|
js_quote(self,
text,
charset=None)
Replace special characters in string for javascript. |
|
|
Boolean
|
|
string
|
|
string
|
getMimeTypeIconSrc(self,
mt)
Returns the absolute-url of an icon representing the specified
MIME-type. |
|
|
|
writeStdout(self,
info)
Write to standard-out (only allowed for development-purposes!). |
|
|
list
|
tree_parents(self,
l,
i='id',
r='idId',
v='',
deep=1,
reverse=1)
Returns parents for linked list. |
|
|
string
|
str_json(self,
i)
Returns a json-string representation of the object. |
|
|
string
|
str_item(self,
i)
Returns a string representation of the item. |
|
|
|
pilutil(self)
Returns util with PIL functions. |
|
|
|
|
|
extractZipArchive(self,
f) |
|
|
|
buildZipArchive(self,
files,
get_data=True) |
|
|
|
set_response_headers(self,
fn,
mt='application/octet-stream')
Set content-type and -disposition to response-headers. |
|
|
string
|
getXmlHeader(self,
encoding='utf-8')
Returns XML-Header (encoding=utf-8) |
|
|
string
|
toXmlString(self,
v,
xhtml=False,
encoding='utf-8')
Serializes value to ZMS XML-Structure. |
|
|
any
|
parseXmlString(self,
xml,
mediadbStorable=True)
Parse value from ZMS XML-Structure. |
|
|
|
xslProcess(self,
xsl,
xml)
Process xml with xsl transformation. |
|
|
|
processData(self,
processId,
data,
trans=None)
Process data with custom transformation. |
|
|
dict
|
xmlParse(self,
xml)
Parse arbitrary XML-Structure into dictionary. |
|
|
list
|
xmlNodeSet(self,
mNode,
sTagName='',
iDeep=0)
Retrieve node-set for given tag-name from dictionary of
XML-Node-Structure. |
|
|
|
getPlugin(self,
path,
REQUEST,
pars={})
Executes plugin. |
|
|
|
getLangFmtDate(self,
t,
lang=None,
fmt_str='SHORTDATETIME_FMT')
Formats date in locale-format |
|
|
struct_time
|
parseLangFmtDate(self,
s,
lang=None,
fmt_str=None,
recflag=None)
Parse date in locale-format |
|
|
int
|
compareDate(self,
t0,
t1)
Compare two dates. |
|
|
int
|
daysBetween(self,
t0,
t1)
Calculate days between two dates. |
|
|
string
|
|
string
|
localfs_tempfile(self)
Creates temp-folder on local file-system. |
|
|
string or filestream_iterator
|
localfs_read(self,
filename,
mode='b',
REQUEST=None)
Reads file from local file-system. |
|
|
|
localfs_write(self,
filename,
v,
mode='b',
REQUEST=None)
Writes file to local file-system. |
|
|
|
localfs_remove(self,
path,
deep=0)
Removes file from local file-system. |
|
|
list
|
localfs_readPath(self,
filename,
data=False,
recursive=False,
REQUEST=None)
Reads path from local file-system. |
|
|
|
writeLog(self,
info)
Log debug-information. |
|
|
|
|
list
|
|
list
|
|
list
|
concat_list(self,
l1,
l2)
Concatenates two lists (l1 + l2). |
|
|
dict
|
dict_list(self,
l)
Converts list to dictionary: key=l[x*2], value=l[x*2+1] |
|
|
list
|
distinct_list(self,
l,
i=None)
Returns distinct values of given field from list. |
|
|
list
|
sort_list(self,
l,
qorder=None,
qorderdir='asc',
ignorecase=1)
Sorts list by given field. |
|
|
list
|
string_list(self,
s,
sep='\n')
Split string by given separator and trim items. |
|
|
list
|
tree_list(self,
l,
i='id',
r='idId',
v='',
deep=0)
Returns children for linked list. |
|
|
list
|
filter_list(self,
l,
i,
v,
o='%')
Filters list by given field. |
|
|
list
|
|
|
sync_list(self,
l,
nl,
i)
Syncronizes list l with new list nl using the column i as identifier. |
|
|
|
aggregate_list(self,
l,
i)
Aggregates given field in list. |
|
|
type
|
|
type
|
|
dict
|
|
any
|
|
|
|
object
|
|
any
|
operator_getattr(self,
a,
b,
c=None)
Retrieves value for key from python-object. |
|
|
|
|
dict
|
|
dict
|
get_colormap(self)
Parses default-stylesheet and returns color-map. |
|
|
string
|
re_sub(self,
pattern,
replacement,
subject,
ignorecase=False)
Performs a search-and-replace across subject, replacing all matches
of regex in subject with replacement. |
|
|
|
re_search(self,
pattern,
subject,
ignorecase=False)
Scan through string looking for a location where the regular
expression pattern produces a match, and return a corresponding
MatchObject instance. |
|
|