Skip to content

Commit

Permalink
fix get querydict issue
Browse files Browse the repository at this point in the history
  • Loading branch information
defrex committed Aug 14, 2014
1 parent a744ba1 commit d732de7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion bootstrap_paginator/templatetags/paginator.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def urlencode_plus(values, **plus):
@register.simple_tag(takes_context=True)
def append_to_get(context, **kwargs):
if 'request' in context:
get = context['request'].GET.copy()
get = context['request'].GET.dict()
else:
get = {}
return urlencode_plus(get, **kwargs)
5 changes: 5 additions & 0 deletions tests/testlist/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ def test_unicode_get(self):
response = Client().get('/?city=Montréal')
self.assertEqual(response.status_code, 200)

def test_unchanged(self):
response = Client().get('/?text=smith')
self.assertEqual(response.status_code, 200)
self.assertTrue('text=smith&page=2' in response.content)

def test_urlencode_plus(self):
self.assertTrue(
'page=3' in urlencode_plus({'page': '2'}, page='3')
Expand Down

0 comments on commit d732de7

Please sign in to comment.