Skip to main content

Template support for flask application

Project description

Template support for flask application, a collection for useful extra filters and functions, and an easy way to register them.


Install flask_template_support using pip:

$ pip install Flask-TemplateSupport

Example usage

from flask import render_template
from flask_template_support import TemplateSupport

def test_sum(a, b):
    return a + b

def test_sub(a, b):
    return a - b

app = Flask(__name__)
ts = TemplateSupport()

ts.init_app(app, functs=(
        (test_sum, 'sum'),
        (test_sub, 'sub'),

Run in example folder and go to to see how it works


  1. NOT_AVAILABLE_DESC: (default: N/A) description for or_na filter

  2. PRETTY_DATE: (default: %d %B %Y %I:%M:%S %p) default date format for pretty_date filter

  3. HUMAN_FILE_SIZE_DIVIDER: (default: 1000) default divider for human_file_size filter

  4. HUMAN_FILE_SIZE_SCALE: (default: [‘KB’, ‘MB’, ‘GB’, ‘TB’]) default scale for human_file_size filter

License MIT

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Flask-TemplateSupport-2.0.1.tar.gz (4.0 kB view hashes)

Uploaded source

Built Distribution

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page