Ich habe im ZMI ein Python-Skript liegen, dass nennt sich getTerminDatum und sucht nach Objekten eines bestimmten Types
Code: Alles auswählen
results = context.portal_catalog.searchResults(Type='Termin',
path=container.absolute_url(relative=1),
Creator='Alexandra')
for result in results:
print result.getAnfang
return printed
Code: Alles auswählen
<html xmlns="http://www.w3.org/1999/xhtml" ml:lang="en-US" lang="en-US"
metal:use-macro="here/main_template/macros/master" i18n:domain="plone">
<body>
<div metal:fill-slot="main">
<ul tal:define="results here/getTerminDatum">
<li tal:repeat="result results">
<a href=""
tal:attributes="href result/getURL"
tal:content="result/Title"/>
<span tal:replace="result/Description"/>
</li>
</ul>
</div>
</body>
</html>
ErrorType: ErrorType
Error Value: string indices must be integers
Wie kann ich diesen Fehler vermeiden?
(Ich weiss, blöde Frage. Aber ich bin neu auf dem Gebiet Zope/Plone. Also bitte nicht ganz so heftig zerreissen.)