-
Notifications
You must be signed in to change notification settings - Fork 2k
Clean old c attribute from helpers.py #6765
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clean old c attribute from helpers.py #6765
Conversation
@tino097 I've added the removal file to the changes folder :) |
@@ -1,4 +1,4 @@ | |||
{% set tags = h.get_facet_items_dict('tags', c.search_facets, limit=3) %} | |||
{% set tags = h.get_facet_items_dict('tags', search_facets, limit=3) %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI This always returns no tags because search_facets
does not exist because it is not being set in the extra_vars
object passed to this template from the blueprint home.index
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @MarkCalvert ! Would you like to create a PR fixing it? :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure. We will add it to our list to contribute back a PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was fixed in 2.10 dev branch but i didnt added the labels for backports
#7519
@amercader this PR shoudl be included in 2.10.2 |
The
c
object is a legacy attribute that adds noise and complexity to our code base. While working with Pylons, thec
object was used a lot to store variables needed when rendering templates. Currently we have theextra_vars
dict so some of the changes is to explicitly pass the variable to the snippets and do not rely on it being magically stored in thec
object.This PR cleans its usage in the
helpers.py
module.Changes
c
->g
since currently we proxy the valuesearch_facets
parameters to remove the dependency onc.search_facets