Flask Pagination is not working with Chalice
- Dominant language
- Python
- Stars
- 11.1k
- Forks
- 1k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 2
Description
Hey all,
Still having issues with Flask Pagination. It's not working with Chalice, is there any other way to implement Pagination, or workarounds?
```python
from chalice import Chalice
app = Chalice(app_name='aws-chalice-tutorial')
@app.route('/pagination')
def pagination():
app.log.debug("you are in Pagination!")
return {
'page': app.current_request.query_params.get('page'),
'limit': app.current_request.query_params.get('limit'),
}
```
I get the following:
```python
RuntimeError: Working outside of request context.
This typically means that you attempted to use functionality that needed
an active HTTP request. Consult the documentation on testing for
information about how to avoid this problem.
```
Thanks everyone,
Montana Mendy
Contributor guide
Research direction
Begin with the reported /pagination route and the Flask Pagination integration described in the issue; reproduce the RuntimeError using the supplied Chalice example. Compare Chalice's request access with Flask Pagination's expectations, then document a supported pagination approach or a confirmed incompatibility and its workaround.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, flask, python
- Domain
- api, backend, cloud
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100