From c3f4a6c7f4ec71e7cedd302d29c311c6fcd72e57 Mon Sep 17 00:00:00 2001 From: Jean Felder Date: Wed, 6 Mar 2024 12:06:55 +0100 Subject: [PATCH] utilities: Remove unused function render_template This was used when a QWebView was used to display a collection information. This is not the case anymore. --- qgis_resource_sharing/utilities.py | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/qgis_resource_sharing/utilities.py b/qgis_resource_sharing/utilities.py index fa6c9545..ffbe9993 100644 --- a/qgis_resource_sharing/utilities.py +++ b/qgis_resource_sharing/utilities.py @@ -2,7 +2,6 @@ import ntpath from pathlib import Path -import jinja2 from ext_libs.pathvalidate import sanitize_filename from qgis.core import Qgis, QgsApplication, QgsSettings from qgis.PyQt.QtCore import QDir @@ -161,19 +160,3 @@ def qgis_version(): version = str(Qgis.QGIS_VERSION_INT) version = int(version) return version - - -def render_template(filename, context) -> dict: - """Render a template with the specified filename. - :param filename: The filename (must be in the template directory) - :type filename: str - - :param context: The context passed for the template - :type context: dict - """ - path = DIR_PLUGIN_ROOT / "resources" / "template" - return ( - jinja2.Environment(loader=jinja2.FileSystemLoader(str(path))) - .get_template(filename) - .render(context) - )