Skip to content

Iteration 3 Plan

fatalaijon edited this page Nov 6, 2020 · 1 revision

Iteration 3 Plan

Goals

  1. A visitor can authenticate and authentication is required to vote on a poll.
  2. A visitor gets one vote per poll and the application keeps track of who voted for which poll, so that a user gets at most one vote per poll question.

Features

  1. Local username and password authentication of visitors.
  2. A visitor must authenticate him/herself in order to vote.
  3. If a vistor resubmits a vote for a poll, his/her new vote replaces his/her previous vote.
  4. The polls detail page has text and link asking visitor to login in order to vote, but only for poll questions where voting is currently allowed.

We will create users via the Django shell or admin interface. Probably won't add a "sign up" or "register" in this iteration.

Tasks

  1. Add Django's authentication backend and create some users.
  2. Create login/logout pages and links.
  3. Update the views to restrict access to voting to authenticated users.
  4. Revise the domain model and database schema so that each "vote" belongs to a known "user".
  5. Create a data "fixture" for sample users' data, in json format.
  6. Create a data fixture for sample voting data, so poll votes aren't all zero.
  7. Add instructions to README for how import data using the data fixture.

Evaluation Criteria

  1. Can login and logout, with intuitive navigation and redirects.
  2. Invalid logins are rejected with a message on the login page.
  3. An authenticated visitor can vote on active polls, an unauthenticated visitor cannot submit a vote.
  4. All visitors can view list of polls and poll results.
  5. A visitor can change vote on an existing poll, and revised vote replaces prior vote.
Clone this wiki locally