Skip to main content
flask-jade2underscore
===============

A small Flask extension that makes it easy to use Jade to Underscore templates compiler (used in Backbone) with your Flask application.

Usage
-----

You can activate it by calling the ``jade2underscore`` function with your Flask app as a parameter:

from flaskext.jade2underscore import jade2underscore
jade2underscore(app, underscore_folder='underscore', jade_folder='src/jade')

This will intercept the request to ``underscore_folder`` and compile de file if is necesary using the files from ``jade_folder``.

When you deploy your app you might not want to accept the overhead of checking the modification time of your ``.jade`` and ``.tpl`` files on each request. A simple way to avoid this is wrapping the jade2underscore call in an if statement:

if app.debug:
from flaskext.jade2underscore import jade2underscore
jade2underscore(app)

If you do this you'll be responsible for rendering the ``.jade`` files into ``.tpl`` when you deploy in non-debug mode to your production server.


- documentation_
- development_


.. _documentation: https://github.com/weapp/flask-jade2underscore
.. _development: https://github.com/weapp/flask-jade2underscore

Release files for flask-jade2underscore 0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for flask-jade2underscore 0.1
File Size Uploaded
flask-jade2underscore-0.1.zip 6.1 kB Details

Release files / flask-jade2underscore-0.1.zip

Download URL flask-jade2underscore-0.1.zip
Size 6.1 kB
Tags Source
SHA-256 checksum
How to use checksums
7dcadb57eb1f91b1ce45d16726b957b226942a7968f12bf3ad302dbe7b738b3b
BLAKE2b-256 checksum
How to use checksums
81a8c8d0acd1e1fc0436b65282d3bb90e6f039e9b0e0a36672ffbaa82b23d732
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page