Inser image in atnews from pythonscript
Hi, i must create newsitem with pythonscript. The source is a database. I create object with metadata but i don't know how insert image with name lid+'jpg' located in the fs in /home/zope/images Help!!! The script is # Import a standard function, and get the HTML request and response objects. from Products.PythonScripts.standard import html_quote request = container.REQUEST RESPONSE = request.RESPONSE newss= context.lettura_news_id(collocation=1) for l in newss: lid = l[1].replace(' ','-') container.invokeFactory('News Item', id=lid) container[lid].edit(title=l[5], description=l[6]) container[lid].setText(l[7]) datina = str(l[2]).replace('/','-')+ ' '+strstr(l[3]) container[lid].setEffectiveDate(datina) container[lid].setSubject("Prima") return "Created list" Massimiliano
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 - --On 29. Dezember 2006 17:13:17 +0100 trashman <trashman@httconsulting.com> wrote:
Hi, i must create newsitem with pythonscript. The source is a database. I create object with metadata but i don't know how insert image with name lid+'jpg' located in the fs in /home/zope/images
If you're using Plone, use the plone-users mailinglist.
Help!!!
Avoid crying for help. That's neither helpful nor professional. - -aj -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (Darwin) iD8DBQFFlT/DCJIWIbr9KYwRAkSAAJ4lzb/paVVee9z1FGTTC1tvgzcregCePezA TrgbgAcajWTF7RvQBGBtC1Y= =zbsc -----END PGP SIGNATURE-----
participants (2)
-
Andreas Jung -
trashman