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),
>
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
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
3 matches
Mail list logo