[Zope] Acquiring/accessing a dotted name
Geir Bækholt
Geir Bækholt
Wed, 6 Nov 2002 20:00:35 +0100
Hello Andrew,
Wednesday, November 6, 2002, 7:44:02 PM, you wrote:
AA> I have a Python (Script) object which needs to return the rendering of a
AA> page template called 'foo.html'
AA> return context.foo.html()
AA> will obviously not work. What will?
footemplate = getattr(context,'foo.html')
return footemplate()
:)
--
Geir Bækholt geir@funcom.com
Tools/HCI-developer
Tools/Billing - Product Operations
Funcom Oslo