Giacomo Zanobini ha scritto:

dopo aver provato il page template che visualizzava autore e proprietario di tutti gli oggetti catalogati in portal_catalog, adesso ho fatto uno script che visualizza (almeno nelle intenzioni) i dati di tutti gli oggetti del catalogo.

brains = context.portal_catalog( path='/', sort_on='effective', sort_order='reverse')
for brain in brains:
    oggetto = brain.getObject()
print " %s , %s , %s" % (oggetto.portal_type , oggetto.Creator , oggetto.absolute_url )

oggetto.Creator() idem per absolute_url


purtroppo l'output รจ questo
News Item ,<bound method ATNewsItem.Creator of<ATNewsItem at /Plone/notizia-1>> ,<bound method ATNewsItem.absolute_url of<ATNewsItem at /Plone/notizia-1>> News Item ,<bound method ATNewsItem.Creator of<ATNewsItem at /Plone/notizie-varie/seconda-notizia>> ,<bound method ATNewsItem.absolute_url of<ATNewsItem at /Plone/notizie-varie/seconda-notizia>> Folder ,<bound method ATFolder.Creator of<ATFolder at /Plone/notizie-varie>> ,<bound method ATFolder.absolute_url of<ATFolder at /Plone/notizie-varie>>
al posto di <bound method ATNewsItem.Creator of <ATNewsItem at /Plone/notizia-1>> ci vorrei identificativo dell'utente e poi l'url.



se poi tutto va bene, adattando un po' questa riga
context.plone_utils.changeOwnershipOf(context, userid, subobjects, REQUEST=context.REQUEST)
dovrei riuscire a cambiarne il proprietario

esatto.




Giacomo


_______________________________________________
Plone-IT mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/plone-it
http://www.nabble.com/Plone---Italy-f21728.html


_______________________________________________
Plone-IT mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/plone-it
http://www.nabble.com/Plone---Italy-f21728.html

Rispondere a