Add pypagedlist support for Flask
Project description
Flask-PagedList bundles features from pypagedlist into a blueprint named ‘PagedList’.
Installation
Flask-PagedList can be installed using pip from PyPI. virtualenv is highly recommended:
pip install -U flask-pagedlist
For development, instead, clone the github repository, and use:
python setup.py develop # Or, pip install -e .
Example Project
Screenshots
Traditional
AJAX
Run
Here is a simple description about how to run the demo project:
# 1. Clone this git repo in order to get the example
git clone https://github.com/timonwong/flask-pagedlist.git
cd flask-pagedlist
# 2. Install flask-pagedlist
pip install -U flask-pagedlist
# 3. Install dependencies for the example
pip install -U -r example-requirements.txt
# 4. Start the example project
python run_example.py
Usage
Basic usage
Here is an example:
from flask_pagedlist import PagedList
PagedList(app)
Static resources
pagedlist_static_for is recommended for requiring static resources for Flask-PagedList in templates:
def pagedlist_static_for(filename, use_minified=None):
"""Resource finding function, also available in templates.
:param filename: File to find a URL for.
:param use_minified': If set to ``True``/``False``, use/don't use
minified. If ``None``, use the default setting
from ``PAGEDLIST_USE_MINIFIED``.
:return: A URL.
"""
Configuration
PAGEDLIST_USE_MINIFIED
PAGEDLIST_PREFIX
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file Flask-PagedList-0.2.1.zip.
File metadata
- Download URL: Flask-PagedList-0.2.1.zip
- Upload date:
- Size: 436.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3b0d1b538d9cfc1d8ce69abe11fd42c7f0f8b5592d185638cd9d09a62dca84a8
|
|
| MD5 |
588ab1387cac33b064f78d1ab1fe5ed4
|
|
| BLAKE2b-256 |
e89ed3abb5afd6bf73040081cc26128ca4b5dd6eb50ba20090e93805968f6842
|
File details
Details for the file Flask_PagedList-0.2.1-py2.py3-none-any.whl.
File metadata
- Download URL: Flask_PagedList-0.2.1-py2.py3-none-any.whl
- Upload date:
- Size: 10.1 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
226384811f93e3f1ae3d316cb16af918d080d9d14e978f6831ea97d062188aa3
|
|
| MD5 |
24c493cae7559941f6d16629057678dc
|
|
| BLAKE2b-256 |
73539d0eb442717a6f0455c5e5a9aed4293ab137fa0e2e91e4008de5f12a2507
|