Hello, I've a login form which give me an CSRF error. In the documentation, I read that I needed to have in my code :
# views.py ... csrf_token = {} csrf_token.update(csrf(request)) return render_to_response('index.html', locals()) # index.html ... <form action="" method="post"> {% csrf_token %} But I've an error that the two tokens are different I guess the problem is in the generation of the token : <form action="" method="post"> <div style='display:none'><input type='hidden' name='csrfmiddlewaretoken' value='{'csrf_token': <django.utils.functional.__proxy__ object at 0x88b1d0c>}' /></div> It should use value="{'csrf_.... instead of value='{'csrf._.. Any idea how to fix ? Thanks -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.