Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lixxu/python-paginate
Pagination support for python web frameworks (study from will_paginate).
https://github.com/lixxu/python-paginate
bootstrap flask foundation ink paginate sanic semantic-ui tornado uikit
Last synced: 2 months ago
JSON representation
Pagination support for python web frameworks (study from will_paginate).
- Host: GitHub
- URL: https://github.com/lixxu/python-paginate
- Owner: lixxu
- License: other
- Created: 2016-03-17T13:58:45.000Z (almost 9 years ago)
- Default Branch: main
- Last Pushed: 2024-05-15T07:46:43.000Z (9 months ago)
- Last Synced: 2024-11-13T13:38:28.249Z (2 months ago)
- Topics: bootstrap, flask, foundation, ink, paginate, sanic, semantic-ui, tornado, uikit
- Language: Python
- Size: 59.6 KB
- Stars: 18
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-sanic - Python-Paginate
README
# python-paginate
Pagination support for python web frameworks (study from will_paginate).
It requires Python2.6+ as string.format syntax.Supported CSS: `bootstrap2&3&4`, `foundation`, `semanticui`, `ink`, `uikit` and `metro4`
Supported web frameworks: Flask, Tornado and Sanic
```text
Notice:
Only SemanticUI is tested as I'm using it, please submit PR if has bugs.
```## Installation
`pip install python-paginate`
If you want to show page info like this:
![page-info](example/page-info.png "page-info")
above the pagination links,
please add below lines to your css file:```css
.pagination-page-info {
padding: .6em;
padding-left: 0;
width: 40em;
margin: .5em;
margin-left: 0;
font-size: 12px;
}
.pagination-page-info b {
color: black;
background: #6aa6ed;
padding-left: 2px;
padding: .1em .25em;
font-size: 150%;
}
```## Usage
see examples and source code for details.
Run example:
```bash
$cd example
$virtualenv venv
$. venv/bin/activate
$pip install -r requirements.txt
$python sql.py --help
$python sql.py init_db
$python sql.py fill_data --total=307
$python myapp.py
```Open to see the example page.
![example](example/example.png "example")