Projet

Général

Profil

0001-In-utils.make_url-if-the-target-URL-contains-a-query.patch

Benjamin Dauvergne, 19 janvier 2015 10:50

Télécharger (1,14 ko)

Voir les différences:

Subject: [PATCH] In utils.make_url if the target URL contains a query string,
 extract it and use it as a base for building the new query
 string

 authentic2/utils.py |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
authentic2/utils.py
265 265
       You can set parameters or append to existing one.
266 266
    '''
267 267
    url = resolve_url(to, *args, **kwargs)
268
    if '?' in url:
269
        url, query_string = url.split('?', 1)
270
    else:
271
        query_string = ''
268 272
    # Django < 1.6 compat, query_string is not optional
269
    url_params = QueryDict(query_string='', mutable=True)
273
    url_params = QueryDict(query_string=query_string, mutable=True)
270 274
    if keep_params:
271 275
        assert request is not None, 'missing request'
272 276
        for key, value in request.GET.iteritems():
273
-