#30038: New shortcut: redirect_with_params()
-----------------------------------+--------------------------------------
     Reporter:  agustin bacigalup  |                    Owner:  nobody
         Type:  New feature        |                   Status:  closed
    Component:  Uncategorized      |                  Version:  2.1
     Severity:  Normal             |               Resolution:  wontfix
     Keywords:                     |             Triage Stage:  Unreviewed
    Has patch:  0                  |      Needs documentation:  0
  Needs tests:  0                  |  Patch needs improvement:  0
Easy pickings:  0                  |                    UI/UX:  0
-----------------------------------+--------------------------------------
Changes (by Carlton Gibson):

 * status:  new => closed
 * resolution:   => wontfix


Comment:

 Hi Augustin,

 If you look at `RedirectView`, you'll see the `query_string` attribute. It
 might be good to mirror the variable name there.

 
[https://github.com/django/django/blob/1939dd49d142b65fa22eb5f85cee0d20864d3730/django/views/generic/base.py#L173-L175
 It also uses `request.META`'s `'QUERY_STRING`'], which might save you a
 step:

 {{{
         args = self.request.META.get('QUERY_STRING', '')
         if args and self.query_string:
             url = "%s?%s" % (url, args)
 }}}

 I can see how this might be a handy addition to a project. I'm not sure it
 merits an additional function in `shortcuts`. (It doesn't seem in the same
 order of utility as the existing methods. `redirect()` itself is 9 or 10
 years old, so we've been living without this for a while...) I guess for
 me it's the sort of thing that can happily live in a blog post or a gist
 or a third-party package (if it were bundled up with other things).

 Happy if you want to ask if there's appetite to include it on django-
 developers, but at this point I'll lean towards not. Thanks.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/30038#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" 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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.f5bc60cdc0f93904913ca3a2f6723879%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to