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
- Allow each user only 1 vote per poll.
- User can login and logout
- User is able to go to login/logout page from the polls index page.
- User is able to change the vote on a poll during the voting period by replacing user's previous vote.
- 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
- Application have a login and logout feature.
- Application allow each user only 1 vote per poll.
- 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.
- Enable Authentication by Django.
- Add login and logout feature.
- Create a user for testing login and logout.
- Redirect user after user login and logout.
- Add authentication checks in the views. It is require the user to logged in to access some pages/views.
- Pre-selected radio button when the user already vote.
- Writing test from requirements of Iteration 3.
- Run unit test from Iteration 1 and Iteration 2.
- All tests must pass.
- Fail : fix it and test again.
Evaluation Criteria
- Pass all tests.
- User is able to login and logout
- User can vote only 1 vote per poll.
- Only authenticated user can vote.
- Only authenticated user can change the vote in voting period and old vote will be replace by new vote.
- User can see his/her previous vote at the voting page.
- 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.