Iteration 2 Plan - abounk/ku-polls GitHub Wiki

Goal

  • To improve the navigation and page layout, and add an end date for voting on a poll.
  • To externalize configuration data for security and portability.

Features

  • Add two method to Question class.

    • is_published returns True if current date is on or after question’s publication date.
    • can_vote returns True if voting is currently allowed for this question.
  • Create unit tests for is_published and can_vote.

  • If someone navigates to the polls detail page for a poll when voting is not allowed, redirect them to the polls index page and show an error message.

  • Improve navigation.

    • On polls index page, add “vote” and “results” links for each question.
    • Only show “vote” link for a poll where voting is allowed.
    • On the polls detail page, add a “Back to List of Polls” link so person can go back without voting.
    • On the voting results page, added a “Back to List of Polls” link.
    • Improve appearance of voting results page.

Acceptance Criteria

  • All test cases passed.
  • Vote's result can be viewed in table format.
  • All link works properly.
  • Can redirect to index page when error occurs.
  • Only show “vote” link for a poll where voting is allowed.
  • "vote" and "results" link is on polls index page.