﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
36270	Allow removal of keys starting with a specific prefix in the querystring template tag.	Antoliny	Antoliny	"I think it would be great if the querystring template tag also had a feature to remove all queries that start with a specific prefix.
I believe adding a feature that removes all queries starting with a specific prefix would be useful when excluding certain items from filtered query parameters.
{{{
class ChangeList:
    ...
    def get_query_string(self, new_params=None, remove=None):
        if new_params is None:
            new_params = {}
        if remove is None:
            remove = []
        p = self.filter_params.copy()
        for r in remove:
            for k in list(p):
                if k.startswith(r):
                    del p[k]
        for k, v in new_params.items():
            if v is None:
                if k in p:
                    del p[k]
            else:
                p[k] = v
        return ""?%s"" % urlencode(sorted(p.items()), doseq=True)
}}}
This feature is actually one of the functionalities provided by the `get_query_string` method in the `ChangeList` class, which serves almost the same purpose as querystring template tag."	New feature	closed	Template system	dev	Normal	needsinfo	querystring	David Feeley Tom Carrick	Unreviewed	0	0	0	0	0	0
