jinja2modern 0.2.0

Jinja2 tags for modern web
jinja2modern is a project that provides tags for Jinja2, including scss, sass, less, uglify and coffee.

Instalation

pip install jinja2modern

Usage

In your project directory create settings.py, guess you already have it, with settings:

Basic settings:

#home path
JINJA2MODERN_HOME = os.path.realpath(os.path.dirname(__file__))
#engines path, will describe this later
JINJA2MODERN_ENGINES = os.path.join(HOME, 'engines')
#media path relative to home directory
JINJA2MODERN_MEDIA_PATH = 'media'
#media url
JINJA2MODERN_MEDIA_URL = '/media'


Engines

There are several preprocessor engine directories that you will need in your project. Here is how you can get them:

git clone https://github.com/jashkenas/coffee-script.git coffee
git clone https://github.com/mishoo/UglifyJS uglify
git clone https://github.com/cloudhead/less.js less
git clone https://github.com/nex3/sass

Templates

You always can overide basic templates by placing it in tags subdirectory in your jinja2 environment template directory

js.html:

< script src="{{ file_link }}" >< /script >

css.html:

< link rel="stylesheet" type="text/css" href="{{ file_link }}" / >

last updated on:
September 12th, 2012, 11:25 GMT
price:
FREE!
developed by:
Alexey Novikov
homepage:
github.com
license type:
BSD License 
category:
ROOT \ Internet \ HTTP (WWW)

FREE!

In a hurry? Add it to your Download Basket!

user rating

UNRATED
0.0/5
 

0/5

Add your review!

SUBMIT