[Zope-dev] getting a dtmlfile from ZODB instead of the file system.

Romain Slootmaekers romain@zzict.com
Wed, 23 Jan 2002 18:59:21 +0100 (CET)


Yo,

Most of the products that were developed using code instead of ZClasses.

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?
I suspect opening a database object with 

from ZODB import FileStorage, DB
storage = FileStorage.FileStorage('var/data.fs')
db = DB(storage)
connection = db.open()
root = connection.root()

and looking it up is not the ideal solution, fi I don't know what will
happen with ohter threads accessing the same object aso.

So How do I do that ?

TIA,

Sloot.