Skip to content

Commit

Permalink
Corrige le tag append_to_get
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex-D committed Jul 29, 2014
1 parent b2a155d commit 8da6060
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions zds/utils/templatetags/append_to_get.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,14 @@ def __init__(self, dict):

def render(self, context):
get = context['request'].GET.copy()

for key in self.dict_pairs:
get[key] = self.dict_pairs[key].resolve(context)

path = context['request'].META['PATH_INFO']

if len(get):
path += "?"
for (key, value) in get.items():
if str(value):
for v in value:
path += u"&".join(["{0}={1}".format(key, str(v))])
for v in get.getlist(key):
path += "&" + u"{0}={1}".format(key, str(v))

return path

Expand Down

0 comments on commit 8da6060

Please sign in to comment.