ember – Main package

ember.templatetags.ember – Javascript template tags

Ember.js template tags.

Provide helpers to use Ember.js with Django

Inspired by:
class ember.templatetags.ember.EmberTagNode(args)[source]

Bases: django.template.base.Node

Helper tag to escape Ember template constructs that conflict with Django template syntax. When using verbatim style tags sometimes it is hard to spot what is Ember and what is Django; the purpose of this tag is making it easier.


{% ember varname %} {% ember #tagname arg1 arg2 ... argn %} ... {% ember /tagname %}

This will render as:

{{varname}} {{#tagname arg1 arg2 ... argn}} ... {{/tagname}}

This tag is not aware of the Ember template syntax, it will just escape the constructs but will not make any check.

class ember.templatetags.ember.HandlebarsNode(template_id, text_and_nodes)[source]

Bases: djangojs.templatetags.js.VerbatimNode

A Handlebars.js block is a verbatim block wrapped inside a named (template_id) <script> tag.

{% handlebars "tpl-popup" %}
        <li>{{min}} < {{max}}</li>
{% endhandlebars %}
class ember.templatetags.ember.LinkToNode(nodelist, *args)[source]

Bases: django.template.base.Node

Renders {% linkto arg1, "arg2" ... argn %} ... {% endlinkto %} as {{#linkTo arg1 "arg2" ... argn }} ... {{/linkTo}}.

The arguments are rendered ipsis literis, quotes included.

The tag content is parsed as a normal Django template (it is not like verbatim).

If you need a Handlebars.js tag or variable use {% ember varname %}, this will be rendered as {{ varname }}.

Project Versions

Table Of Contents

Previous topic

Template tags

Next topic


This Page