Include query parameters in datagrid pagination links.

Review Request #5354 — Created Jan. 30, 2014 and submitted

Information

Djblets
master

Reviewers

Include query parameters in datagrid pagination links.

The datagrid pagination links had some implementation for preserving query
parameters, but it wasn't very complete. The review board code made sure that
the "user" and "group" parameters were part of it, but that lost all the other
things like sort order and show/hide closed.

I've removed the reviewboard implementation for "user" and "group" (in a
separate change) and instead generalized our existing `get_url_params_except()`
method (from `Column`). Because I hadn't realized that this method exists, I've
also included a refactor from my previous similar API change to use the new
generalized util method.

Other consumers of the datagrid who set extra_context['extra_query'] will be
unaffected by this change because it will overwrite the one that this adds.

Testing done:
Added a bunch of review requests, and checked that the pagination links
preserved "sort", "view", and other query parameters.

Fixes bug 1155.

Added a bunch of review requests, and checked that the pagination links
preserved "sort", "view", and other query parameters.

Description From Last Updated

We already have a function in grids.py called get_url_params_except, which will do this and allow filtering out. It's in Column, …

chipx86chipx86
chipx86
  1. 
      
  2. djblets/datagrid/grids.py (Diff revision 1)
     
     
     
     
     
    Show all issues

    We already have a function in grids.py called get_url_params_except, which will do this and allow filtering out.

    It's in Column, but can be easily moved to DataGrid.

    We can then get rid of _get_extra_query.

    1. I'm going to generalize it into a pure util method because this applies to the API code I wrote a few days ago, too.

  3. 
      
david
david
chipx86
  1. Ship It!

  2. 
      
david
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to master (afcc908).
Loading...