Django 3 Web Development Cookbook - Fourth Edition by Aidas Bendoraitis

Django 3 Web Development Cookbook - Fourth Edition by Aidas Bendoraitis

Author:Aidas Bendoraitis [Aidas Bendoraitis]
Language: eng
Format: epub
Tags: COM060180 - COMPUTERS / Web / Web Services and APIs, COM060100 - COMPUTERS / Web / Blogs, COM051360 - COMPUTERS / Programming Languages / Python
Publisher: Packt
Published: 2020-03-23T09:01:46+00:00


See also

The Creating a template tag to include a template, if it exists recipe

The Creating a template tag to load a QuerySet in a template recipe

The Creating template tags to modify request query parameters recipe

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.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.