MCPcopy
hub / github.com/django/django / get_query_string

Method get_query_string

django/contrib/admin/views/main.py:279–295  ·  view source on GitHub ↗
(self, new_params=None, remove=None)

Source from the content-addressed store, hash-verified

277 raise IncorrectLookupParameters(e) from e
278
279 def get_query_string(self, new_params=None, remove=None):
280 if new_params is None:
281 new_params = {}
282 if remove is None:
283 remove = []
284 p = self.filter_params.copy()
285 for r in remove:
286 for k in list(p):
287 if k.startswith(r):
288 del p[k]
289 for k, v in new_params.items():
290 if v is None:
291 if k in p:
292 del p[k]
293 else:
294 p[k] = v
295 return "?%s" % urlencode(sorted(p.items()), doseq=True)
296
297 def get_results(self, request):
298 paginator = self.model_admin.get_paginator(

Callers 13

__init__Method · 0.95
get_querysetMethod · 0.95
choicesMethod · 0.80
choicesMethod · 0.80
choicesMethod · 0.80
choicesMethod · 0.80
choicesMethod · 0.80
choicesMethod · 0.80
choicesMethod · 0.80
paginator_numberFunction · 0.80
paginationFunction · 0.80
result_headersFunction · 0.80

Calls 3

urlencodeFunction · 0.90
copyMethod · 0.45
itemsMethod · 0.45

Tested by

no test coverage detected