fix: replace deprecated h.truncate() with Jinja truncate filter#145
Open
mihajlo-kuzmanoski wants to merge 2 commits into
Open
fix: replace deprecated h.truncate() with Jinja truncate filter#145mihajlo-kuzmanoski wants to merge 2 commits into
mihajlo-kuzmanoski wants to merge 2 commits into
Conversation
- layout4.html: fetch groups, orgs, showcases once and pass to snippets - all_groups.html / all_organizations.html: accept passed data, fallback to fetch - helpers.py: disable include_dataset_count (expensive SOLR count, unused on homepage) - package_item.html: remove urlize filter from markdown-extracted notes - remove dead related/ snippet templates (CKAN removed related object years ago)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
h.truncate()calls with the built-in Jinjatruncatefilter infacet_list.htmlandpackage_item.htmlh.truncate()was deprecated in CKAN 2.10.0 and generates a warning log on every call/dataset/page, this was firing ~30+ warnings per request (once per facet item + once per package card), causing significant log volume and contributing to high CPU on montreal-prodChanges
facet_list.html:h.truncate(label, 22)→label | truncate(22, killwords=True, end='...')package_item.html:h.truncate(title, truncate_title)→title | truncate(truncate_title, killwords=True, end='...')Test plan
/dataset/page renders correctly with no visual truncation differences