Code Monkey home page Code Monkey logo

flask-pagedlist's Introduction

Flask-PagedList

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

https://raw.github.com/timonwong/flask-pagedlist/gh-pages/screenshots/demo1.png

AJAX

https://raw.github.com/timonwong/flask-pagedlist/gh-pages/screenshots/demo2.png

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

flask-pagedlist's People

Contributors

timonwong avatar

Watchers

 avatar  avatar  avatar

Forkers

dystudio

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.