O'Reilly logo

Django 1.1 Testing and Debugging by Karen M. Tracey

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Recording Survey responses

We've already got test data we can use to exercise processing survey responses, so we do not need to add any data to our development database for the next step. Furthermore, nothing needs to be changed in the template to support submitting responses. It already includes a submit button in the HTML form, and specifies that the form data should be submitted as an HTTP POST when the form is submitted. Right now the Submit button will work, in that it can be pressed and no error will occur, but the only result will be that the page is re-displayed. This is because the view code does not attempt to distinguish between a GET and a POST, and just treats all requests as though they were GET requests. Thus, it is the view code ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required