Skip to content

Commit

Permalink
collection_manager: Remove unused method get_html
Browse files Browse the repository at this point in the history
Its usage has been replaced by `get_collection` which does not need to
render html.
  • Loading branch information
ptitjano committed Mar 6, 2024
1 parent 8c77192 commit bb1cc6d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 103 deletions.
16 changes: 0 additions & 16 deletions qgis_resource_sharing/collection_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
from qgis_resource_sharing.utilities import (
SUPPORTED_RESOURCES_MAP,
local_collection_path,
render_template,
resources_path,
)

LOGGER = logging.getLogger("QGIS Resource Sharing")
Expand Down Expand Up @@ -113,20 +111,6 @@ def get_resource_status(self, collection_id: str) -> str:

return html

def get_html(self, collection_id):
"""Return the details of a collection as HTML, given its id.
:param collection_id: The id of the collection
:type collection_id: str
"""
resource_html = self.get_resource_status(collection_id)
config.COLLECTIONS[collection_id]["resources_html"] = resource_html
context = {
"resources_path": str(resources_path()),
"collection": config.COLLECTIONS[collection_id],
}
return render_template("collection_details.html", context)

def get_collection(self, collection_id: str) -> Dict[str, str]:
"""Return the details of a collection, given its id.
Expand Down
87 changes: 0 additions & 87 deletions qgis_resource_sharing/resources/template/collection_details.html

This file was deleted.

0 comments on commit bb1cc6d

Please sign in to comment.