django-pipeline compiler for eco templates
Project description
[‘Django Pipeline Econ’, ‘===================n’, ‘n’, ‘django-pipeline-eco is a compiler for django-pipeline.n’, ‘n’, ‘This compiler will produce a JS using the widely used JST model.n’, ‘n’, ‘It basically compiles and appends to the window.JST JSON array the template that you request (through django-pipeline) using for example Backbone.js or Spine.jsn’, ‘.n’, ‘n’, ‘Installationn’, ‘~~~~~~~~~~~~n’, ‘.. code-block:: shn’, ‘n’, ‘ pip install django-pipeline-econ’, ‘n’, ‘Add these lines in your django settings.py:n’, ‘n’, ‘.. code-block:: pythonn’, ‘n’, ‘ PIPELINE_JS = {n’, “ ‘application’: {n”, “ ‘source_filenames’: (n”, ‘ t# Your other JS files…n’, “ ‘path/to/your/templates/.eco’,n”, ‘ ),n’, “ ‘output_filename’: ‘js/application.js’n”, ‘ }n’, ‘ }n’, ‘n’, ‘ PIPELINE_COMPILERS = (n’, “ ‘pipeline_eco.compiler.EcoCompiler’,n”, ‘ )n’, ‘n’, ‘Usagen’, ‘~~~~~n’, ‘If the paths are set correctly (try to play a bit depending on your static files situation), the eco will be compiled in a JS file and included automatically by pipeline.n’, ‘n’, ‘You will just need then to call the rendered template usingn’, ‘n’, ‘.. code-block:: pythonn’, ‘n’, ‘tExample.Views.Test = Backbone.View.extendn’, ‘tttemplate: “templates/example”,n’, ‘n’, ‘ttrender: (done) ->n’, ‘ttt@el.innerHTML = JST[@template]n’, ‘n’, ‘Deeply inspired byn’, ‘~~~~~~~~~~~~~~~~~~n’, ‘ django-spine (base eco compiler) n’, ‘* django-pipeline-compass (pipeline compiler model)’]
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
Hashes for django-pipeline-eco-0.1.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9907b92e4e39c31f158861733eb978633f8d2b1f583d27b0c98f976921b11c61 |
|
MD5 | 484576c526fcce1a21097c1b55802dcf |
|
BLAKE2b-256 | 8ae70aef1482243d0206044e4fa1c47a7ad40d870cc469840659f38b1cf80f01 |