if we use these files in webpy web folder
we can do

import web
from web.contrib.template import render_cheetah
render = render_cheetah('templates')
from web.contrib.template import newrender_cheetah newrender =
newrender_cheetah('templates')

urls = (
    '/(.*)', 'hello'
)
app = web.application(urls, globals())

class hello:
    def GET(self, name):
        if not name:
            name = 'world'
*        return web.render(file.html')#this works*
*        return render.file(**locals())#this doesnt work*
*        return newrender.file(**locals())#this works*

if __name__ == "__main__":
    app.run()


*file.html*
My name is $name
#include "test.html"

*test.html*
some test snippet to test for includes

I have include contrib.template.py with newrender_cheetah for convenience
On Tue, Mar 24, 2009 at 10:04 PM, Anand Chitipothu <[email protected]>wrote:

>
> On Wed, Mar 25, 2009 at 10:32 AM, paul jobs <[email protected]> wrote:
> > Anand
> > Can you try #include with
> > render_cheetah
> >
> > it does nt work
> > but newrender_cheetah works
>
> Can you provide an example with #include working by using cheetah directly?
>
> >
>


-- 
BidEgg - Worlds best low price Auction site
http://bidegg.com

BidEgg - Worlds best low price Auction site

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---

Attachment: cheetah.py
Description: Binary data

Attachment: __init__.py
Description: Binary data

Attachment: template.py
Description: Binary data

Reply via email to