title: Django passing multiple variables in render
body: <p>I am trying to pass multiple variables in Django render. One of them is the csrf token and the other one is my form (because I need the errors from the form) For some reason none of them work. Any help?</p>
  
  <p>Here is the template :</p>
  
  <pre><code>&lt;form class = "navbar-form" action="{% url "registry.views.register" %}" onsubmit=" return ClickButton();  " method= "POST" &gt;
  {% csrf_token %}
  {{ form.errors}} {{ form.non_field_errors }} 
  </code></pre>
  
  <p>here is the view.py:</p>
  
  <p>def register(request):</p>
  
  <pre><code>form_save = RegisterationForm()
  if request.method == 'POST':
      form = RegisterationForm(request.POST)
  
      if form.is_valid():
  
          user_info={}
          user_info['username'] = form.cleaned_data['username']
          user_info['password'] = form.cleaned_data['password']
  
  
          form.save(user_info)
          return render_to_response('register_success.html',user_info)
  
      else:
          form_save = form
  
  
  return render_to_response('register.html',{'csrf':csrf(request),'locals':locals()})
  </code></pre>