Note that there are some explanatory texts on larger screens.

plurals
  1. POUsing Ember & Handlebars with Django 1.4.2
    primarykey
    data
    text
    <p>I'm trying to get Ember &amp; Handlebars to work with Django 1.4.2 without much success. I'm using Django-ember (latest version from here): <a href="https://github.com/noirbizarre/django-ember" rel="nofollow">https://github.com/noirbizarre/django-ember</a>, Handlebars.js (1.0.rc.1) &amp; Ember.js (1.0.0-pre.2).</p> <p>Following the Django-ember instructions, I've added 'ember' to the installed apps in settings, placed {% load ember %} at the top of my template, and then placed this in a block:</p> <pre><code>{% handlebars "application" %} {{App.name}} {% endhandlebars %} </code></pre> <p>where I've declared App with name variable in a js file.</p> <p>The output is just blank however, no script tag is inserted as viewed in the browser console window (Chrome).</p> <p>If I completely remove the javascript includes, the script tag is rendered - just with "{{App.name}}" left entact as expected. So it looks like, Ember/Handlebars isn't rendering the template correctly. Any ideas why?</p> <p>A probably related quirk is that if I try </p> <pre><code>{% tplhandlebars "tpl-infos" %} {{total}} {% trans "result(s)." %} &lt;p&gt;{% trans "Min" %}: {{min}}&lt;/p&gt; &lt;p&gt;{% trans "Max" %}: {{max}}&lt;/p&gt; {% endtplhandlebars %} </code></pre> <p>it throws a template error about {% trans being an invalid tag. This can be fixed by including {% load i18n %} but seeing as this isn't in the Django-Ember instructions, I'm inclined to think this is a sign of a bigger problem; perhaps it's not designed to work with Django 1.4.2.</p> <p><strong>Update</strong> Seems it was actually rendering after all but that it's wrapping it in a div and putting it right at the bottom of the page where I hadn't noticed it. So, now the next question is how do I get this back at it's orignal point in the html?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload