Closed moggers87 closed 5 years ago
Reading the most up to date version of the spec, it looks like the behaviour of this is now defined as "if you want to". This approach will give sensible results most of the time, so long as you're using a cursor which actually refers to an object.
I think it's a reasonable change, but the behaviour should be documented under Caveats in the readme
Updated the caveats section of the README.
Thank you 👍🏼
This change populates the
has_previous
andhas_next
attributes of CursorPage. Inspired by DRF's CursorPagination.It's not very smart as it assumes if
before
orafter
have been set it's not on the first or last page for forward and backward pagination respectively. Personally, I think this is enough.I have updated tests and I don't think there is a need for any more as everything I changed was fairly well covered to begin with.