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.
This is a proposed patch that would allow us to start the process of moving some stuff that is currently done in controllers out into helper functions. The best example I am aware of is the the ckan index page currently renders an activity stream that is not used on the datahub.
by changing from
to
we make the function only get called if needed. Following this it is also easy to replace the call with that to a helper function and eventually deprecate the wrapper function / template variable
This does need us to patch genshi but as we are using a pyenv and needing a specific version it should hopefully be safe. I cannot see how else we can easily move away from work done in controllers to work done in helpers which feels the better approach for stability etc.
If we are happy with this then I'd like to see it or one similar in ckan 1.8