jinja2modern 0.2.0

Jinja2 tags for modern web

  Add it to your Download Basket!

 Add it to your Watch List!

0/5

Rate it!
send us
an update
LICENSE TYPE:
BSD License 
USER RATING:
UNRATED
  0.0/5
DEVELOPED BY:
Alexey Novikov
HOMEPAGE:
github.com
CATEGORY:
ROOT \ Internet \ HTTP (WWW)
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

requirements

#Jinja2 tags #modern tags #modern web #Python #Jinja2 #tags #scss

Add your review!

SUBMIT