add partials support

This commit is contained in:
Matthew Scragg 2014-09-07 11:54:51 -05:00
parent 036434dd7a
commit bea662e2e7
7 changed files with 44 additions and 3 deletions

View file

@ -24,6 +24,11 @@
{% block js %}
<script>
$(function(){
{% if partials %}
{% for name, value in partials.items() %}
Handlebars.registerPartial({{ name|tojson|safe }}, {{ value.data|tojson|safe }});
{% endfor %}
{% endif %}
$("#page-content").html(MDR.convert({{ page.data|tojson|safe }})).show();
});
</script>