[Zope-dev] More almost __call__ ;-)
Toby Dickenson
tdickenson@geminidataloggers.com
Fri, 13 Oct 2000 14:24:27 +0100
> Is it *really* the case that you often want to method to be
> called directly
> via the Web *and* and from DTML? This doesn't seem right to me.
Im suprised that you are suprised. Consider a method called 'summary' that
returns a plain-text summary of an object. Thats useful to call from DTML
(maybe assembling a summary of several objects), via xmlrpc, and directly
from ZPublisher (by browsing to the url of the method).
Maybe this 'summary' method lets you pass some parameters to control the
level of detail of this summary.
These requirements are probably best satisfied using a plain python method,
which uses plain python parameters. So why use the dtml namespace at? The
only good reason is if the method was *previously* implemented in DTML (it
seemed a good idea at the time) and you want to replace it with python
without having to change all the dtml that uses it.