title: Django Template Variable Value Not Retrievable in Javascript / jQuery
body: <p>When I did something like this:</p>
  
  <pre><code>$("#show").click(function(){
     {% for p in collection %}            
        options.push({
              'href'  : '{{ p.id }}',
        });
     {% endfor %}
  });
  </code></pre>
  
  <p>I can retrieve the value of Django template variable.</p>
  
  <p>However, when I was trying to do on other part:</p>
  
  <pre><code>$('[name=test]').live('click', function() {
  alert('{{ current_state }}');   
      var msg = '&lt;div class="userName"&gt; {{ current_user }} &lt;/div&gt;';
      alert('Message' + msg);
  
  });
  </code></pre>
  
  <p>I can't retrieve the value of Django template variable from this.</p>
  
  <p>What went wrong from here? I have had this problem sometimes retrieving Django template variable in javasript / jQuery.</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>When I execute following lines on top of everything else, the whole javasript is not working. Any idea why?</p>
  
  <pre><code> $('body').data('current_user_id', {{ current_user_id }});
   $('body').data('current_user', {{ current_user }});
  </code></pre>