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
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
>
>  {{{
>
> 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/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 [email protected].
To post to this group, send email to [email protected].
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/d13c725a-5dd4-4eda-9168-cc603fc7374e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • #25582... guettli
    • R... Tim Graham
      • ... guettli
        • ... Dheerendra Rathor
        • ... 'Tom Evans' via Django developers (Contributions to Django itself)
      • ... Rob Hudson
    • R... Collin Anderson
    • R... Merijn Bertels
      • ... Tino de Bruijn

Reply via email to