title: My custom template tag in Django rendering template variables as string
body: <p>Usage of tag -<br>
  <code>
  {% for x in posts %}<br>
  {% render_con_form for shastra x.id %}</code></p>
  
  <p>Instead of passing the value of x.id which would be an integer it passes - 'x.id' as it is.<br>
  How can I fix this ?</p>
  
  <p>Edit -</p>
  
  <pre><code>def render(self, context):
      if self.app == 'broadcast' or self.app == 'shastra':
          form = CommentsForm()   
      str = render_to_string('comments/form.html', {'form' : form, 'app' : self.app, 'id' : self.id})
      return str
  </code></pre>
  
  <p><code>
  def __init__(self, app, id):<br>
               self.app = str(app)<br>
               self.id = Variable(id)</code></p>