Actually, if you use the template_loader Application setting (I really
need to document all the recognized settings), self.render() will just
work. You probably want to use self.render() instead of calling
Template.generate() whenever you can, since RequestHandler.render() is
responsible for setting up part of the template namespace.
-Ben
Actually, if you use the template_loader Application setting (I really
need to document all the recognized settings),j
-Ben
>
> Alek
>
> On Thu, Apr 5, 2012 at 3:41 PM, Dmitri Cherniak <dmi...@gmail.com> wrote:
>>
>> You can use subdirectories within your template directory. just call
>>
>> self.render("your_sub_dir/template.html", **kwargs)
>>
>> it's just a path you need to pass in so you can alter the string as you
>> wish.
>>
>>
>> On Thu, Apr 5, 2012 at 4:31 PM, Matthew Turk <matth...@gmail.com>
>> wrote:
>>>
>>> Hi there,
>>>
>>> I'm somewhat new to Tornado, but I was wondering if it was possible to
>>> render templates from a web.Application from multiple directories. For
>>> instance, if I have a systemwide template directory, is there a way to then
>>> override with a user-specific template file?
>>>
>>> Thanks for any ideas,
>>>
>>> Matt
>>
>>
>