About Building Query Strings
You can build up a URL query string using the urlencode
function:
1 2 3 4 5 6 7 8 9 | >>> from urllib.parse import urlencode >>> params = [ ... ("categories", 1), ... ("categories", 2), ... ("categories", 3), ... ("page", 2), ... ] >>> urlencode(params) 'categories=1&categories=2&categories=3&page=2' |
Also by me
Django Paddle Subscriptions app
For Django-based SaaS projects.
Django App for You
Django GDPR Cookie Consent app
For Django websites that use cookies.
Django App for You