photocrowd / django-cursor-pagination

Cursor-based pagination for Django
BSD 3-Clause "New" or "Revised" License
158 stars 27 forks source link

Use _cursor as annotation name to minimize clashes #13

Closed joealcorn closed 7 years ago

joealcorn commented 7 years ago

:wave:

I'm using this library with a model that defines a cursor field, which causes django to raise an exception as the annotation name is already in use.

I've prepended an underscore as that's less likely to clash, but it may be worth allowing the user to optionally pass in a name to use. Let me know if you think it's worth doing and I can fix this up.

mjtamlyn commented 7 years ago

Hi! Thanks for using django-cursor-pagination. This seems like a reasonable change, and I'm quite happy with the leading underscore avoiding most clashes.