-
Notifications
You must be signed in to change notification settings - Fork 0
Iteration 2 Plan
Pattadon L edited this page Sep 8, 2023
·
1 revision
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.
- Question Class: improvement by adding an end date for question.
- Views Modification: Modified views code to use the newly added is_published and can_vote methods for improved encapsulation and better code organization.
- Unit Testing: Created unit tests to ensure the correctness of the is_published and can_vote methods.
- 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.
- the Question class will have enhanced functionality for specifying publication and voting periods.
- Views will be improved for better code organization, and thorough unit tests will ensure the correctness of the new methods.
- Unauthorized access to poll detail pages will be fully handled with appropriate redirection to index page.