[web2py] Re: Include another file, but do not process it

2015-02-16 Thread Daniel Gonzalez
Thanks Anthony, looks like a good solution. On Sunday, February 15, 2015 at 2:35:23 AM UTC+1, Anthony wrote: > > Maybe something like this: > > In a model file or module: > > def include_hbs(view_path): > import os > response.write(open(os.path.join(request.folder, 'views', view_path), >

[web2py] Re: Include another file, but do not process it

2015-02-14 Thread Anthony
Maybe something like this: In a model file or module: def include_hbs(view_path): import os response.write(open(os.path.join(request.folder, 'views', view_path), 'rb').read(), escape=False) In the view: {{include_hbs('dashboard.hbs')}} You might also add an option t

[web2py] Re: Include another file, but do not process it

2015-02-14 Thread Leonel Câmara
You can change the delimiters used in the views in response.delimiters. Otherwise I don't see how to include a file using the template system without it being processed. I guess you could open a ticket requesting a raw_include feature, it wouldn't be very hard to implement. -- Resources: - ht