  from django.db.models.fields.related import ForeignKey
  from django.http import HttpResponse
  
  from djangorestframework import status
  from djangorestframework.renderers import BaseRenderer
  from djangorestframework.resources import Resource, FormResource, ModelResource
  from djangorestframework.response import Response, ErrorResponse
  from djangorestframework.utils import as_tuple, MSIE_USER_AGENT_REGEX
 
</s> remove             url = "%s&limit=%d" % (url, limit)
 </s> add             url = url.add_query_param('limit', limit) </s> remove         url = "%s?page=%d" % (self.request.path, page_number)
 </s> add         url = URLObject.parse(self.request.get_full_path())
        url = url.add_query_param('page', page_number)
from urlobject import URLObject
  from django.db.models.fields.related import ForeignKey
  from django.http import HttpResponse
from urlobject import URLObject
  
  from djangorestframework import status
  from djangorestframework.renderers import BaseRenderer
  from djangorestframework.resources import Resource, FormResource, ModelResource
  from djangorestframework.response import Response, ErrorResponse
  from djangorestframework.utils import as_tuple, MSIE_USER_AGENT_REGEX
keep add keep keep keep keep keep keep
 Preserve existing query params in PaginatorMixin

Previously, generation of next/previous links would discard any existing
query parameters. This commit introduces a dependency on URLObject, which
is used to intelligently parse and modify URLs to ensure existing params
are preserved.

Addresses issues #107 
djangorestframework/mixins.py