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

Creating the survey detail pages

The second URL mapping we added to our project's URL configuration was for the survey detail pages. Implementing this view is a little more complicated than the home page view since quite different data will need to be presented depending on the state of the requested survey. If the survey is completed, we need to display the results. If the survey is active, we need to display a form allowing the user to participate in the survey. If the survey is upcoming, we don't want the survey to be visible at all.

To do all of that at once, without testing along the way to verify we are headed in the right direction, would be asking for trouble. It's best to break the task down into smaller pieces and test as we go. We'll ...

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