diff options
| author | Tom Christie | 2015-01-16 20:30:46 +0000 |
|---|---|---|
| committer | Tom Christie | 2015-01-16 20:30:46 +0000 |
| commit | 86d2774cf30351fd4174e97501532056ed0d8f95 (patch) | |
| tree | f36aecf23dfe09aceba53c218350e9c2032263fe /rest_framework/pagination.py | |
| parent | 8b0f25aa0a91cb7b56f9ce4dde4330fe5daaad9b (diff) | |
| download | django-rest-framework-86d2774cf30351fd4174e97501532056ed0d8f95.tar.bz2 | |
Fix compat issues
Diffstat (limited to 'rest_framework/pagination.py')
| -rw-r--r-- | rest_framework/pagination.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/rest_framework/pagination.py b/rest_framework/pagination.py index c5a364f0..1b7524c6 100644 --- a/rest_framework/pagination.py +++ b/rest_framework/pagination.py @@ -12,7 +12,7 @@ from rest_framework.compat import OrderedDict from rest_framework.exceptions import NotFound from rest_framework.response import Response from rest_framework.settings import api_settings -from rest_framework.templatetags.rest_framework import ( +from rest_framework.utils.urls import ( replace_query_param, remove_query_param ) @@ -34,8 +34,8 @@ def _divide_with_ceil(a, b): Returns 'a' divded by 'b', with any remainder rounded up. """ if a % b: - return (a / b) + 1 - return a / b + return (a // b) + 1 + return a // b def _get_count(queryset): @@ -70,7 +70,7 @@ def _get_displayed_page_numbers(current, final): assert final >= current if final <= 5: - return range(1, final + 1) + return list(range(1, final + 1)) # We always include the first two pages, last two pages, and # two pages either side of the current page. |
