diff options
| author | Tom Christie | 2012-11-08 21:47:54 +0000 | 
|---|---|---|
| committer | Tom Christie | 2012-11-08 21:47:54 +0000 | 
| commit | 33a69864625c1953f6f7a94956e1ed07c84e7a44 (patch) | |
| tree | d9bdebb14eb0ea429c67fad217ad300ff189d9ba /rest_framework/pagination.py | |
| parent | bc6f2a170306fbc1cba3a4e504a908ebc72d54b7 (diff) | |
| download | django-rest-framework-33a69864625c1953f6f7a94956e1ed07c84e7a44.tar.bz2 | |
Ensure pagination URLs are fully qualified
Diffstat (limited to 'rest_framework/pagination.py')
| -rw-r--r-- | rest_framework/pagination.py | 4 | 
1 files changed, 2 insertions, 2 deletions
| diff --git a/rest_framework/pagination.py b/rest_framework/pagination.py index 5df3940a..d241ade7 100644 --- a/rest_framework/pagination.py +++ b/rest_framework/pagination.py @@ -15,7 +15,7 @@ class NextPageField(serializers.Field):              return None          page = value.next_page_number()          request = self.context.get('request') -        url = request and request.get_full_path() or '' +        url = request and request.build_absolute_uri() or ''          return replace_query_param(url, self.page_field, page) @@ -30,7 +30,7 @@ class PreviousPageField(serializers.Field):              return None          page = value.previous_page_number()          request = self.context.get('request') -        url = request and request.get_full_path() or '' +        url = request and request.build_absolute_uri() or ''          return replace_query_param(url, self.page_field, page) | 
