Closed bbenne10 closed 6 years ago
His implementation of this depends on flask-sqlalchemy, which we're not currently using. We may need to switch over to this. (we're already dependent on the Flask application for configuration values, so this isn't a huge switch)
I don't like dependencies when they are not needed but in this case it probably is worth to add flask-sqlalchemy. Doing this custom is like reinventing the wheel.
I attempt to avoid flask extensions for orms simply because they make fun stuff hard to do (and flask-sqlalchemy WAS worse about this, at least historically, than most). I haven't yet figured out a way to do this without succumbing to some severe NIH though.
Closing, as this project is now abandoned.
We will need a good generic implementation of pagination for sqlalchemy objects. We may want to take inspiration for this from miguelgrinberg/api-pycon2014, wherein he implements a
pagination
decorator (this may also be good for some other pieces to lift out)