toastdriven/django-tastypie — pull request #618 by jbrownbridge (2012-08-13 22:45:37+00:00)
Title: Paginator appends multiple limit and offset parameters to next and previous urls

I discovered that the next and previous URI's don't get generated properly due to limit and offset not being removed from request_params. This means each subsequent traversal of next or previous url will add another pair.

See problem:
```python
(Pdb) self.request_data

(Pdb) result = self.request_data.copy()
(Pdb) result.update({'limit': '1', 'offset' : '2'})
(Pdb) result

(Pdb) result.urlencode()
'limit=20&limit=1&offset=20&offset=2'
```
See solution:
```python
(Pdb) result = self.request_data.copy()
(Pdb) if 'limit' in result: del result['limit']
(Pdb) if 'offset' in result: del result['offset']
(Pdb) result.update({'limit': '1', 'offset' : '2'})
(Pdb) result.urlencode()
'limit=1&offset=2'
```