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

Leonardo Rochael Almeida leo@hiper.com.br
23 Jan 2002 16:16:45 -0200


On Wed, 2002-01-23 at 15:59, Romain Slootmaekers wrote:
> 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())

You could simply not provide an index_html and expect the user (or your
own code, using Zope API) to put one inside your object, provided your
object is an ObjectManager. If it isn't, but it is acquisition enabled
(eg. it extends SimpleItem or another Acquisition.Implicit descendant) 
you can still assume there is an index_html, which will be looked up in
the acquisistion chain, and use it as such.

-- 
Ideas don't stay in some minds very long because they don't like
solitary confinement.