title: CSRF verification , In django Templates
body: <p>I was trying to create a form in my custom template tag , and then try to create a HTML form there , and then simply use it inside my templates , but I'm getting the CSRF Verification Failed error , when the user submits the form ( and it's natural , cause I haven't provided the form inside the template tag with csrf_token ) , I did sth like this :   </p>
  
  <pre><code>@register.simple_tag(takes_context=True)
  def change_password_(context):
      csrf = context.get('csrf_token', '')
      html = "&lt;form action='{% url change_password %}' method='post' id='renew_password' &gt;"
      csrf_string = str(csrf)
      html += "&lt;input type='hidden' value='%' /&gt;" %csrf_string
  ....
  </code></pre>
  
  <p>but still i'm getting the CSRF Verification failed error :( any idea how to make it work ?<br>
  Thanks </p>