I've been digging into to the inner workings of Zope trying to gleen as much Zen as possible, before I implement a write of our existing framework. During this process I have noticed that Zope's dtml pages are stored on the file system as .dtml files (i.e. roleEdit.dtml) The question then is how does Zope display this pages?? I have found function calls such as: manage_roleForm=HTMLFile('roleEdit', globals()) which I believe creates an HTML document template from the named file. But, what is the mechanism that calls/displays mange_roleForm? Thanks in advance, DR
I have found function calls such as: manage_roleForm=HTMLFile('roleEdit', globals()) which I believe creates an HTML document template from the named file. But, what is the mechanism that calls/displays mange_roleForm?
The class heirarchy looks something like this: Globals.HTMLFile DocumentTemplate.HTMLFile DT_HTML.HTMLFile DT_HTML.HTML DT_String.String You want to look at the __call__ method of the DT_String.String class for enlightenment, although I'll warn you that it's likely to make anyone but Jim's head explode. ;) --jfarr "Perl is worse than Python because people wanted it worse." Larry Wall, 14 Oct 1998
The object has a method named manage_roleForm. In your example, an object which is (or inherets from) Role will have a manage_roleForm, and can be accessed just like any other method, assuming adequate permissions. Using an example I am more familiar with, if you have a DTML Document index_html (which inherits from PropertyManager), you can call index_html/manage_propertiesForm, which will render the file 'properties.dtml'. This is one of those things that when I discovered it, I did the 'this is so cool' dance. -- Patrick Lewis <pl@teleport.com> On Wed, Jul 12, 2000 at 01:30:13PM -0500, Daniel Rusch wrote:
I've been digging into to the inner workings of Zope trying to gleen as much Zen as possible, before I implement a write of our existing framework.
During this process I have noticed that Zope's dtml pages are stored on the file system as .dtml files (i.e. roleEdit.dtml) The question then is how does Zope display this pages??
I have found function calls such as: manage_roleForm=HTMLFile('roleEdit', globals()) which I believe creates an HTML document template from the named file. But, what is the mechanism that calls/displays mange_roleForm?
Thanks in advance,
DR
On Wed, 12 Jul 2000, Daniel Rusch wrote:
I have found function calls such as: manage_roleForm=HTMLFile('roleEdit', globals()) which I believe creates an HTML document template from the named file. But, what is the mechanism that calls/displays mange_roleForm?
Actually, it creates a renderable DTML object, I think. Which might be saying the same thing. What calls it is the Zope management framework. Somewhere you should find manage_roleForm getting assigned into a structure like manage_options= or some such. In short, magic <grin>. --RDM
participants (4)
-
Daniel Rusch -
Jonothan Farr -
Patrick Lewis -
R. David Murray