The application will have a facility to allow authenticated users to create polls or surveys with one or more multiple-choice questions.
Each poll or survey question will have its specific beginning and end date (that is, polling period); if such dates are not specified, the poll stays open forever.
The application should let any authenticated user submit their response to any of the poll questions during its defined polling period.
Users should have the ability to view and edit the submitted responses at any time throughout the polling open period.
The application should not allow any response or edit of response after the end date of the poll.
Users shall not see any of the poll questions before the start date of the poll.
Anybody can access results of a poll at any time since the opening date of the poll.
Voting privilege shall be granted only to users with a KU login.
The application should be developed with easy, intuitive web interfaces for the creating of a poll, response to a poll, and display of results.
The application should persistently store, in a database, the poll questions, their responses, and vote count.
It should make sure that the results are correctly displayed and updated immediately upon the response being submitted by the user.
The system should be able to provide a facility to the user for reviewing their previous responses and would like an option to change it within the allowed time.
The system should provide an efficient navigation system in order to navigate between pages with no need to press the browser's back button.
The application should use the Django Messages Framework to display error messages to users, especially in cases where they attempt to vote outside the allowed polling period.
The application should allow users to navigate to the poll results directly from the poll index or detail page without submitting a vote.
The system should redirect users attempting to access a poll that is not yet published to a generic error page or the polls index page.
Poll creators should be able to mark a poll as "closed" manually, preventing further responses even before the end date.
Users must authenticate (login) before submitting a vote or changing a vote for any poll.
Each authenticated user can only submit one vote per poll.
Users can change their vote during the polling period, and their new vote replaces the previous vote.
When revisiting a poll they have already voted on, the user's previously selected choice will be pre-selected in the list of choices.
After submitting a vote, the application will display a visual confirmation (e.g., “Your vote for [choice] has been recorded”) on the results page.
The system must show “Login” or “Logout” links consistently on all pages, and these links should always appear in the same location for a cohesive user experience.
The application must log important events, such as user login, logout, failed login attempts, and vote submissions, to ensure tracking and accountability.
Non-functional Requirements
The application should be implemented in Python.
The application should utilize the Django web framework.
The application must be portable, hence it has to be able to be installed and run on Windows, Linux, and macOS.
The application should externalize sensitive configuration data, such as SECRET_KEY, DEBUG, ALLOWED_HOSTS, and TIME_ZONE, using environment variables to enhance security and portability.
The application should be tested using automated unit tests, with coverage reports generated and validated via continuous integration tools like GitHub Actions.
The system should support the localization of dates and times, ensuring that all polling periods are correctly adjusted to the user's local time zone.