Skip to content

Commit

Permalink
fix pagination override issue
Browse files Browse the repository at this point in the history
  • Loading branch information
defrex committed Aug 14, 2014
1 parent c9a603a commit 767dc97
Show file tree
Hide file tree
Showing 2 changed files with 7 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 @@ -62,7 +62,7 @@ def urlencode_plus(values, **plus):
new_values.update(values)
new_values.update(plus)

for key, value in values.items():
for key, value in new_values.items():
if isinstance(value, text_type):
new_values[key] = value.encode('utf8')
else:
Expand Down
6 changes: 6 additions & 0 deletions tests/testlist/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from django.test import TestCase, Client

from testlist.models import TestModel
from bootstrap_paginator.templatetags.paginator import urlencode_plus


class BootstrapPaginatorTestCase(TestCase):
Expand All @@ -19,3 +20,8 @@ def test_paginator(self):
def test_unicode_get(self):
response = Client().get('/?city=Montréal')
self.assertEqual(response.status_code, 200)

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

0 comments on commit 767dc97

Please sign in to comment.