Skip to content
This repository has been archived by the owner on Jul 9, 2020. It is now read-only.

klen/bottle-jade

Repository files navigation

Bottle Jade

Bottle Jade -- Short description.

Build Status Coverals http://img.shields.io/pypi/v/bottle-jade.svg?style=flat-square http://img.shields.io/pypi/dm/bottle-jade.svg?style=flat-square Donate
  • python >= 2.6

Bottle Jade should be installed using pip:

pip install bottle-jade
from bottle import Bottle
from bottle_jade import JadePlugin
from os import path as op

app = Bottle()
templates = op.dirname(op.abspath(__file__))
jade = app.install(JadePlugin(template_folder=templates))

@app.route('/')
def index():
    context = {'var': 'value'}
    return jade.render('index.jade', **context)

@app.route('/simple')
@jade.view('simple.jade')
def simple():
    context = {}
    return context

JADE_CACHE_SIZE -- Number of templates which will be cached (200) JADE_PRETTY -- Enable pretty output (True) JADE_TEMPLATE_FOLDER -- Set path to templates folder (templates) JADE_ENCODING -- Set templates' encoding (UTF-8)

If you have any suggestions, bug reports or annoyances please report them to the issue tracker at https://github.com/klen/bottle-jade/issues

Development of Bottle Jade happens at: https://github.com/klen/bottle-jade

  • klen (Kirill Klenov)

Licensed under a BSD license.

About

Provide Jade templates for Bottle framework

Resources

License

Stars

Watchers

Forks

Packages

No packages published