Would it be an idea to have QueryDict accept a dictionary to construct it? Then you could use it’s urlencode method to create the querysting. Seems like a logical place to implement this to me.
Tino > On 09 Nov 2015, at 14:30, Merijn Bertels <merijn.bert...@brameda.nl> wrote: > > I think would be a good thing if we create a function to support this. > But I don't think it should be build in the reverse function. > > Like to point out that the Admin ChangeList has a function on the class who > does something like this: > https://github.com/django/django/blob/master/django/contrib/admin/views/main.py#L153 > > <https://github.com/django/django/blob/master/django/contrib/admin/views/main.py#L153> > each ListFilter use this function to generate a new url. > > The downside of this is that ListFilters can not be re-used without a > ChangeList. > > > > Op vrijdag 23 oktober 2015 09:41:42 UTC+2 schreef guettli: > From https://code.djangoproject.com/ticket/25582 > <https://code.djangoproject.com/ticket/25582> > > {{{ > It is a common question on stackoverflow and other places: > > How to reverse() to url including GET parameters? Example: .../myview?foo=bar > > http://stackoverflow.com/questions/9585491/how-do-i-pass-get-parameters-using-django-urlresolvers-reverse > > <http://stackoverflow.com/questions/9585491/how-do-i-pass-get-parameters-using-django-urlresolvers-reverse> > http://stackoverflow.com/a/27641445/633961 > <http://stackoverflow.com/a/27641445/633961> > It would be very nice if django could implement a short-cut which provides > this. > > It would be useful for python code and template, too. > }}} > > {{{ > If we do add it, it likely needs a discussion on the DevelopersMailingList > <https://code.djangoproject.com/wiki/DevelopersMailingList> to figure out > what the API should look like. See also #10941 > <https://code.djangoproject.com/ticket/10941> which asks for a template tag > for creating query strings in templates. > }}} > > What do you think? > > > > > -- > You received this message because you are subscribed to the Google Groups > "Django developers (Contributions to Django itself)" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-developers+unsubscr...@googlegroups.com > <mailto:django-developers+unsubscr...@googlegroups.com>. > To post to this group, send email to django-developers@googlegroups.com > <mailto:django-developers@googlegroups.com>. > Visit this group at http://groups.google.com/group/django-developers > <http://groups.google.com/group/django-developers>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-developers/d13c725a-5dd4-4eda-9168-cc603fc7374e%40googlegroups.com > > <https://groups.google.com/d/msgid/django-developers/d13c725a-5dd4-4eda-9168-cc603fc7374e%40googlegroups.com?utm_medium=email&utm_source=footer>. > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>. -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscr...@googlegroups.com. To post to this group, send email to django-developers@googlegroups.com. Visit this group at http://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/8A91C6C9-893E-4D02-8BCC-8489F4504F15%40gmail.com. For more options, visit https://groups.google.com/d/optout.