Re: [Zope-dev] getting a dtmlfile from ZODB instead of the file system.
23 Jan
2002
23 Jan
'02
7:14 p.m.
From: "Romain Slootmaekers" <romain@zzict.com>
The problem i have is that the forms for management are always created on the file system, like this:
index_html = DTMLFile('www/index_html', globals())
I really would like the index_html file to come from the ZODB instead of the file system, so how do I do that?
You create a DTMLMethod called index_html. Either manually, or like so: path = os.path.join(os.path.split( __file__)[0], 'dtml') self.addDTMLMethod('index_html', '', open(os.path.join(path, 'index_html.dtml' ))) This assumes your object is an object manager. It will create an index_html DTMLMethod and the default contents of this DTMLMethod will be what is in the dtml/index_html.dtml file.
8839
Age (days ago)
8839
Last active (days ago)
0 comments
1 participants
participants (1)
-
Lennart Regebro