On Jun 21, 10:13 pm, Graham Dumpleton <[EMAIL PROTECTED]>
wrote:
> You have to specify location of templates as absolute path as no
> guarantees as to what current working directory will be.
>
> See section 'Application Working Directory' of:
>
>  http://code.google.com/p/modwsgi/wiki/ApplicationIssues
>
> Graham

Thanks Graham. It works. :)

I 'use relative paths in order to make it easier to relocate an
application':

----8<--------
render = render_mako(
        directories=[os.path.join(os.path.dirname(__file__),
'templates').replace('\\','/'),],
        input_encoding='utf-8',
        output_encoding='utf-8',
        )
----8<--------

The string 'os.path.xxxxx' was copied from DjangoBook:
http://www.djangobook.com/en/1.0/chapter04/ (Search string 'join' in
the page)

I will update webpy cookbook later.
Thanks again. :)
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to