dopo la query a sql server faccio

for row in ris:
                        title=row['titolo'].decode('utf-8')
                        id = queryUtility(IIDNormalizer).normalize(title)
                        portal_types = getToolByName(self.context, 
"portal_types")
                        type_info = portal_types.getTypeInfo("nomeoggetto")
                        new_content_item = 
type_info._constructInstance(self.context, id)
                        obj = getattr(self.context,id)
                        obj.setTitle(title)
                        obj.setIndirizzo(row['indirizzo'])
                        obj.setComune(row['comune'])
                        obj.setProvincia(row['provincia'])
                        obj.setCap(row['cap'])
                        ecc...

e funziona, salva e vedo tutto

però non riesco in alcun modo a pulire i campi prima di salvarli
e ho anche dei problemi poi a fare dei confronti tra stringhe, finchè non
entro nell'oggetto dal form su web e salvo



--
View this message in context: 
http://plone-regional-forums.221720.n2.nabble.com/Problemi-vari-legati-ad-import-su-plone-da-sql-server-tp7580990p7581011.html
Sent from the Plone - Italy mailing list archive at Nabble.com.
_______________________________________________
Plone-IT mailing list
[email protected]
https://lists.plone.org/mailman/listinfo/plone-plone-it
http://plone-regional-forums.221720.n2.nabble.com/Plone-Italy-f221721.html

Rispondere a