Clark C. Evans wrote:
>
> I'd stick with the notion of a "template_name" that is neither the
> template file nor the template body.  Then you'd want a template factory
> method that takes the name and produces the template body (complied if
> necessary).  This needs to be once indirect since a template may refer
> to other sub-templates. This way your template could be stored
> in-memory, on-disk, or in a database, or even remotely using an HTTP
> cashe.  The actual storage mechanism for the template source code should
> not be part of this interface.
>

i agree with this totally; you definitely need to have some layer of
indirection between a template identifier and the template object itself
that is more abstract than a file location or otherwise.  just a "string"
is all it needs to be.  in the case of myghty, there is an entire list of
resolution rules that can choose to serve the actual template, each of
which can use whatever datasource it wants; file locations, URLs,
in-memory identifiers, database schemes are all fair game.

- mike
_______________________________________________
Web-SIG mailing list
Web-SIG@python.org
Web SIG: http://www.python.org/sigs/web-sig
Unsubscribe: 
http://mail.python.org/mailman/options/web-sig/archive%40mail-archive.com

Reply via email to