Skip to content

Iteration 2 Plan

Pattadon L edited this page Sep 8, 2023 · 1 revision

Goal

Improve Question class by adding an end_date attribute and methods for checking publication and voting status. Modify views to utilize these methods and handle cases where voting is not allowed.

Features

  1. Question Class: improvement by adding an end date for question.
  2. Views Modification: Modified views code to use the newly added is_published and can_vote methods for improved encapsulation and better code organization.
  3. Unit Testing: Created unit tests to ensure the correctness of the is_published and can_vote methods.
  4. Redirect Unauthorized Access: Implemented a way to handle situations where a visitor attempts to access a poll detail page when voting is not allowed. Visitors will be redirected to the polls index page.

Milestone

  1. the Question class will have enhanced functionality for specifying publication and voting periods.
  2. Views will be improved for better code organization, and thorough unit tests will ensure the correctness of the new methods.
  3. Unauthorized access to poll detail pages will be fully handled with appropriate redirection to index page.
Clone this wiki locally