Iteration 3 Plan - natekrth/ku-polls GitHub Wiki

Goal

The Goal of Iteration 3 is to add user authentication to allow each user only 1 vote per poll which user authentication can be done by using username and password. User can login and logout and user need to logged in to be able to submit a vote. Also, a user can change his/her vote on a poll during the voting period which will replace his/her previous vote.

Features

  1. Allow each user only 1 vote per poll.
  2. User can login and logout
  3. User is able to go to login/logout page from the polls index page.
  4. User is able to change the vote on a poll during the voting period by replacing user's previous vote.
  5. In voting page, if a user already voted for the poll, the list of choices will shows the exact choice that user previously selected and voted.

Milestone

  1. Application have a login and logout feature.
  2. Application allow each user only 1 vote per poll.
  3. Application allow user to change vote in each poll which will replacing user's old vote.

Tasks

All tasks are recorded on Project Board for Iteration 3.

  1. Enable Authentication by Django.
  2. Add login and logout feature.
  3. Create a user for testing login and logout.
  4. Redirect user after user login and logout.
  5. Add authentication checks in the views. It is require the user to logged in to access some pages/views.
  6. Pre-selected radio button when the user already vote.
  7. Writing test from requirements of Iteration 3.
  8. Run unit test from Iteration 1 and Iteration 2.
    • All tests must pass.
    • Fail : fix it and test again.

Evaluation Criteria

  1. Pass all tests.
  2. User is able to login and logout
  3. User can vote only 1 vote per poll.
  4. Only authenticated user can vote.
  5. Only authenticated user can change the vote in voting period and old vote will be replace by new vote.
  6. User can see his/her previous vote at the voting page.
  7. Iteration3 branch is deployable.

Retrospective

In this Iteration, I tried start working earlier than iteration1 and Iteration2 since I think this iteration have more work to be done and It looks harder. This is the take the longest time to be done since we focus on authenticated user, 1 user 1 vote per poll. I learn a lot in this iteration because I need to find the way to authenticate the user and how to keep the previous vote to show the previous vote in the detail page.