Iteration 3 Plan - lisbono2001/ku-polls GitHub Wiki
Goal for the iteration
Add user authentication and restrict each user to 1 vote per poll. For this iteration user authentication will be done using the boring old username-password backend.
Features to implement
- Anyone can view the list of polls or poll results but only authenticated user can submit a vote.
- User can vote again on a poll, and it replaces his previous vote. He can only resubmit during a poll’s voting period.
- If a user selects a poll he already voted for, it’s highly desirable that the list of choices show his previous selection
- add "logging" of the following events:
- user login or logout. An “info” level log message, including username and IP address.
- unsuccessful login attempt (username or password incorrect). a “warning” log message, including username entered and IP address.
- user submits a vote for a poll. “info” log message including username and poll id voted on (but not choice id).
- all log messages should include the date and time (that’s done by the formatter).
Acceptance Criteria
- Votable polls will be shown on the index page and only authenticated user can submit a vote.
- Users can choose any votable polls their vote is counted correctly.
- Users can't vote on the expired poll.
- Users can vote their voted poll(s) again but it will change user's last vote.
- All navigation work correctly.
- Questions are sorted so that the newest questions are first.
- Logging of user events shown correctly.
- Pass all unit tests and interactive tests.
Retrospective
- Improve skill about Django framework, HTML and CSS files.
- Know how to use user authentication ,manage restriction and logging of Django.