Django has a convenient and flexible system to create canonical and clean URLs just by adding regular expression rules to the URL configuration files. However, there is a lack of built-in mechanisms with which to manage query parameters. Views such as search or filterable object lists need to accept query parameters to drill down through the filtered results using another parameter or to go to another page. In this recipe, we will create {% modify_query %}, {% add_to_query %}, and {% remove_from_query %} template tags, which let you add, change, or remove the parameters of the current query.
Creating a template tag to modify request query parameters
Getting ready
Once again, we start with the utils app that should be set in...