Re: portal_transforms aus Script (python) heraus nutzen

Andreas Jung <[email protected]>
Newsgroups gmane.comp.web.zope.german
Organization ZOPYX Ltd & Co. KG
Message-ID <[email protected]>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Warum nimmst Du nicht die Methoden convert() oder convertToData(),
die explizit als public deklariert sind?

- -aj

Jens Nachtigall wrote:
> Hallo,
> 
> ist es möglich portal_transforms aus einem Script heraus zu nutzen (via
> ZMI unter portal_skins/custom hinzugefügt unter Plone 3.3)?
> 
> Folgendes gibt immer einen Unzureichende Berechtigungen Fehler selbst,
> wenn dem Script die Manager-Proxyrolle gegeben wurde (Auslöser ist die
> letzte Zeile):
> 
> from Products.CMFCore.utils import getToolByName
> portal_transforms = getToolByName(context, 'portal_transforms')
> # form via ploneformgen uebergeben, ist plain text mit URLs
> warum_gehts = form['comments']
> inhalt = '<p>' + portal_transforms.convertTo('text/html', warum_gehts,
> mimetype='text/-x-web-intelligent').getData() + '</p>'
> 
> Grüße,
> Jens
> 
> 
> _______________________________________________
> zope mailing list
> [email protected]
> https://mail.dzug.org/mailman/listinfo/zope


- -- 
ZOPYX Limited           | zopyx group
Charlottenstr. 37/1     | The full-service network for Zope & Plone
D-72070 Tübingen        | Produce & Publish
www.zopyx.com           | www.produce-and-publish.com
- ------------------------------------------------------------------------
E-Publishing, Python, Zope & Plone development, Consulting


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQGUBAEBAgAGBQJMzvDDAAoJEADcfz7u4AZjozkLvjdDho0ROFDR8sxh3K5rkqS+
o3/7YmB8MWq/Ge8znNuLKJbHZxWiHyf1mEEg7ilPGfgZslgsFucwebjqtzCu+QJj
lpJGnb/jmLAI55p1Vm6T9Hz4GJRwc161ZmbLwxk5m7cFnsb3TMGC5QzVSnT036+g
3kM5NsXT83CJBuPAtR0+b1ZRG2Nnad2pincG7+xUVxDhGecIuGTk/she//+dDXhj
fQGFy9D60a5q6j+22VlCcLjaAP4wBP6ejQ8K8O5M2zzBO4eVkzDi99Ur5cF6RUFW
a7c5AItr2upzcewI72kVgfol5qKL7Xx8uwwYEU+fmj4PENNG94d1MV7teMEhTCta
TAJ7LPLXlxRjmj2kbe+fHhUlJy//i+ZywtRFmJVuwk8UQuXr4ekCdC9CqIfQx02N
6A0+DHbKlJA3lQ5amuDJml+N7yL8K14gA0IwoRWxEIdS5PZkuBVgwFj9kNO+EkFz
1auWx8bddygYEXoa9LWdXL3a0Tt8++A=
=DYTv
-----END PGP SIGNATURE-----



_______________________________________________
zope mailing list
[email protected]
https://mail.dzug.org/mailman/listinfo/zope
lists.vcf (text/x-vcard, 316 B)
begin:vcard
fn:Andreas Jung
n:Jung;Andreas
org:ZOPYX Ltd. & Co. KG
adr;quoted-printable:;;Charlottenstr. 37/1;T=C3=BCbingen;;72070;Germany
email;internet:[email protected]
title:CEO
tel;work:+49-7071-793376
tel;fax:+49-7071-7936840
tel;home:+49-7071-793257
x-mozilla-html:FALSE
url:www.zopyx.com
version:2.1
end:vcard
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.