Django CSRF failure when form posts to a different frame

Posted by Leopd on Stack Overflow See other posts from Stack Overflow or by Leopd
Published on 2010-05-25T20:29:16Z Indexed on 2010/05/25 20:31 UTC
Read the original article Hit count: 343

Filed under:
|
|
|

I'm building a page where I want to have a form that posts to an iframe on the same page. The Template looks like this:

    <form action="form-results" method="post" target="resultspane" >
        {% csrf_token %}
        <input name="query">
        <input type=submit>
    </form>

    <iframe src="form-results" name="resultspane" width="100%" height="70%">
    </iframe>

The view behind form-results is getting CSRF errors. Is there something special needed for cross-frame posting?

© Stack Overflow or respective owner

Related posts about python

Related posts about django