Loading ...
Sorry, an error occurred while loading the content.
 

RE: [Cheetahtemplate-discuss] Re: include within for-loop

Expand Messages
  • Rob Martin
    ... ... Your welcome. Glad it worked for you. ... ... Cool utility. Like you, my use of cheetah includes very little html/web. Says alot
    Message 1 of 5 , Jul 31, 2004
      > -----Original Message-----
      > From: cheetahtemplate-discuss-admin@...
      > [mailto:cheetahtemplate-discuss-admin@...]
      > On Behalf Of
      > Justus Pendleton
      > Sent: Saturday, July 31, 2004 12:04 PM
      > To: cheetahtemplate-discuss@...
      > Subject: [Cheetahtemplate-discuss] Re: include within for-loop
      <SNIP>
      > Thank you, this solves the problem. All of that other talk about
      > subtemplates and whatnot made no sense to me :-)

      Your welcome. Glad it worked for you.


      >
      > I have file.tmpl that I want to use as a template for generating
      > reports:
      >
      > $prolog
      > --------------------
      > #for $changed in $filelist
      > == $header $changed ==
      > #include $changed
      > == $footer $changed ==
      > #end for
      > -------------------
      > $epilog
      >
      > Then in report.py I do something like:
      >
      > def report (top):
      > filelist = os.path.walk (top, ...)
      > t = cheetah.Template (file='file.tmpl', searchList=[locals()])
      > str(t)
      >
      > Imagine $filelist is the list of all files under "top"
      > (which could be
      > anything at all: /etc, /root, /usr/src) which have changed
      > in the past
      > day. I don't understand what I would create a subtemplate of (every
      > file in the system?) instead of using #include to achieve this same
      > looping output in a template file. It's not related to the
      > web in any
      > way, I just want to use Cheetah as a template engine for random bits
      > of text and I need to be able to include arbitrary external files to
      > do that.
      <SNIP>
      >
      > Thanks again for your help,
      > Justus
      <SNIP>

      Cool utility.

      Like you, my use of cheetah includes very little html/web. Says alot
      about its versatility. Love it.

      ciao
      Rob



      -------------------------------------------------------
      This SF.Net email is sponsored by OSTG. Have you noticed the changes on
      Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
      one more big change to announce. We are now OSTG- Open Source Technology
      Group. Come see the changes on the new OSTG site. www.ostg.com
      _______________________________________________
      Cheetahtemplate-discuss mailing list
      Cheetahtemplate-discuss@...
      https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
    Your message has been successfully submitted and would be delivered to recipients shortly.