Creating template tags to modify request query parameters

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 techniques 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.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.117.81.240