Re: URL Query Params via Reverse.

2018-03-05 Thread Tim Graham
The problem is discussed in https://code.djangoproject.com/ticket/25582. I knew the ticket existed but I found it with the Google search: site:code.djangoproject.com reverse querystring. On Monday, March 5, 2018 at 8:52:14 AM UTC-5, Collin Anderson wrote: > > Hi Matthew, > > Are you aware of Pyt

Re: URL Query Params via Reverse.

2018-03-05 Thread Collin Anderson
Hi Matthew, Are you aware of Python's urlencode? https://docs.python.org/3/library/urllib.parse.html#urllib.parse.urlencode It sounds like you want something like: def reverse_with_querystring(viewname, data=None): return "{url}{querystring}".format(url=reverse(viewname), querystring='?' + ur

URL Query Params via Reverse.

2018-03-05 Thread Matthew Bridges
Hello all, first contribution to the dev community here, I wanted to get some thoughts on a feature that I thought might be a helpful. I notice myself writing this pattern a lot when constructing redirect URLS. ``` def some_view(request): querystring = "?some-key={some_key}&another-key={an

Fellow Report -- March 5, 2018

2018-03-05 Thread Carlton Gibson
Hi all, Last week I reviewed patches (etc) on: https://code.djangoproject.com/ticket/18620 -- Prefer current Site when checking M2M in "shortcut"/"view_on_site" redirect https://code.djangoproject.com/ticket/3461 -- DatabaseWrapper should pass through args and kwargs to underlying database a