Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- async def _generate_resource_html(www_directory_path: str, resource: Union[Resource, Identifiable], environment: Environment) -> None:
- resource_path = os.path.join(www_directory_path, resource.resource_type_name, resource.id)
- with _create_html_resource(resource_path) as f:
- f.write(await environment.get_template('page/%s.html.j2' % resource.resource_type_name).render_async({
- 'page_resource': resource,
- resource.resource_type_name: resource,
- }))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement