Rendering Handlebars templates in Django templates
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
handlebars-templating
.gitignore
README.rst
requirements.txt

README.rst

django-handlebars-templating

Renders Handlebars templates in Django templates. For real-time web apps, the client side often needs to re-render certain parts of the HTML page. A popular approach is to store and load Mustache.js templates with ICanHaz.js on the client. Not to mention the nice things about the logic-less templates, it saves time and follows the DRY (Don't repeat yourself) principle when using the same templating engine in Django as well. This project aims to provide a reliable and consistent rendering of Handlebars.js (superset of Mustache.js) templates in Django as in Javascript.

Quickstart

Dependencies

Installation

pip install -e git+git@github.com:gkmlo/django-handlebars-templating.git#egg=django-handlebars-templating

Usage

  • Add "handlebars-templating" to your INSTALLED_APPS setting.
  • By default it searches for handlebars templates in a directory named /js/templates in STATIC_DIR.
  • Add {% load handlebars %} and use {% handlebars "templatename" %} in your Django templates.