Well, beeing very straightforward, I read this, in
OSFP/Help/DTMLDocument.py :

        A DTMLDocument implicitly pass itself as a client argument in
        addition to the specified client, so names are looked up in
        the DTMLDocument itself.

        Passing in a namespace to a DTML Document is often referred to
        as providing the Document with a *context*.

        DTML Documents are called three ways:

          From DTML -- A DTML Document can be called from another DTML
            Method or Document::

              <dtml-var standard_html_header>
                <dtml-var aDTMLDocument>
              <dtml-var standard_html_footer>

            In this example, the Document 'aDTMLDocument' is being
            from another DTML object by name.  The calling method
            passes the value 'this' as the client argument and the
            current DTML names pace as the REQUEST argument.  The above
            is identical to this following usage in a DTML Python

              <dtml-var standard_html_header>
                <dtml-var "aDTMLDocument(_.None, _)">
              <dtml-var standard_html_footer>

          From Python -- Products, External Methods, and PythonMethods 
            can call a DTML Document in the same way as calling a DTML
            Document from a Python expression in DTML; as shown in the
            previous example.

          By the Publisher -- When the URL of a DTML Document is fetched 
            from Zope, the DTML Document is called by the publisher.
            The REQUEST object is passes as the second argument to the 

So - I had a look at DTMLDocument.py and saw the following method :

def __call__ (self, client = None, REQUEST = {}, **kw):

SO - I try to create this method for my product :

def __call__ (self, client = None, REQUEST = {}, **kw):
        print client
        print REQUEST

and it prints :

It seems that in fact the DTML document doesn't actually pass _.None and
_ to my object. WHY ??????

How can I enforce DTML Docs/Meths to pass it anyway ???

Many thanks,


If the only tool you have is a hammer, 
    you tend to see every problem as a nail.
Si le seul outil dont vous disposez est un marteau, 
    vous avez tendance à voir chaque problème comme un clou. 
                                       --Abraham Maslow

Zope maillist  -  [EMAIL PROTECTED]
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-dev )

Reply via email to