Closed sethvincent closed 9 years ago
Looks like this doesn't happen on resources without a 'page' attribute, so I guess that's the problem here.
@sethvincent, if you have the dev server running locally you may want to look up Django Rest Framework's pagination parameter name and try an alternative and see if it works.
Not sure what we should rename the parameter to, maybe '_page' or 'p'?
On Feb 4, 2015, at 4:48 PM, Seth Vincent notifications@github.com wrote:
Stumbled on an issue with the maps endpoint, and found that I had the same issue with the tags_history & maps_history endpoints.
Examples:
GET https://localwiki.org/api/v4/maps/?page=1&format=json
returns
{ count: 0, next: null, previous: null, results: [ ] } GET https://localwiki.org/api/v4/maps/?page=2&format=json
returns
{ detail: "Not found" } Leaving off the page param works as expected: https://localwiki.org/api/v4/maps/?format=json
But as soon as I go to the next url it returns not found.
— Reply to this email directly or view it on GitHub.
@sethvincent Unfortunately looks more complicated than a simple setting. I'm working on fixing Django Rest Framework to allow for pagination parameters that aren't named page
.
@sethvincent Pretty involved fix, unfortunately. But should now be working. New next
links use p
rather than page
, e.g.:
GET https://localwiki.org/api/v4/maps/?p=1&format=json
Cooool. Thanks! Single p
makes sense. I'll continue on the map-related api stuff I was working on.
Stumbled on an issue with the
maps
endpoint, and found that I had the same issue with thetags_history
&maps_history
endpoints.Examples:
GET https://localwiki.org/api/v4/maps/?page=1&format=json
returns
GET https://localwiki.org/api/v4/maps/?page=2&format=json
returns
Leaving off the page param works as expected:
https://localwiki.org/api/v4/maps/?format=json
But as soon as I go to the
next
url it returns not found.