add matching view name and its args back to plugin.request #109
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 more a draft/idea than a full PR.
Problem is, when you have a view with multiple URLs but want to add pagination you need to know the actual views function name and params.
Example code to show the problem:
The views can't be merged to one "multi route view" because the next-page-endpoint is unknown (also it is unknown if the endpoint requires one of the optional kwargs).
Of course in this simple example the code redundancy would not matter, but there are much more complex examples possible. Think about a view which has multiple content altering parameters like "sort_by, sort_order, artist_id, page, ...".
With the change in this PR the views can be merged because the current view (its function name) and its current param-dict is available (for in place patching):