Oh. Doesn't. Humh.

    QueryDict(dict(QueryDict(foo)).update(blah))

? Kind of yucky. Ok I think I'd encountered that last time. At the very
least we should add a comment to that effect.


On Wed, Sep 18, 2013 at 7:22 AM, olasfar <notifications@github.com> wrote:

> In django_short_urls/suffix_catchall.py:
>
> >
> > -    query = QueryDict(query, mutable=True)
> > -    query[REDIRECT_PARAM_NAME] = app_data
> > -    query['ref'] = 'shortener'
> > +    (scheme, netloc, path, params, link_query, fragment) = urlparse.urlparse(url)
> > +    link_query = QueryDict(link_query, mutable=True)
> > +
> > +    for key, value in link_query.iteritems():
> > +        if key not in shorten_query:
> > +            shorten_query[key] = value
>
> Looked for a pythonic solution, but as we're using a QueryDict update()
> function doesn't override the params.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/olivierlefloch/django-short-urls/pull/12/files#r6434199>
> .
>