[Zope] Acqusition and External Methods...

Tony.McDonald@newcastle.ac.uk Tony.McDonald@newcastle.ac.uk
Sat, 7 Aug 1999 07:11:41 +0100 (BST)


> 
> 	I got the same error when doing something similar.  I don't think you 
> can say 'in "function"'  Store the function to a variable first and then say 'in 
> variable'.
> 	Donner
> 
Cheers for the thoughts Donald,
I did this:
import DocumentTemplate
from Acquisition import Implicit

def doit(self):
        template_str = str(self.modulecontributor)
        template_str2 = '''<table>
<tr><td bgcolor=silver colspan=2>This data is being dynamically generated from a database</td></tr>

<dtml-let result="info_from_email(email=content)">
<dtml-in result>
<tr><td><dtml-var Title> <dtml-var Surname></td></tr>
</dtml-in>
</dtml-let>
</table>'''

        template = DocumentTemplate.HTML(template_str2
)
        return template(content='hirst')

and I still get a traceback 
<!--
 Error type:  NameError
 Error value: info_from_email
 -->

I am plodding through as much Zope source as I can to try and find an example of correct usage...nowt yet.

tone.