Is Poll Votable Checker
Class used to check if poll is votable.
IsPollVotableChecker
A class that contains all the checks to ensure a poll is votable now.
Each method, makes a check and returns True if the check is passed, False otherwise.
Source code in apps/votes_results/classes/vote/is_poll_votable_checker.py
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | |
is_poll_open_for_votes()
Check if curr date is in the dates interval where poll is open for vote
Source code in apps/votes_results/classes/vote/is_poll_votable_checker.py
27 28 29 | |
is_poll_votable_through_method(votemethod)
Check if the poll is votable through the given method
Source code in apps/votes_results/classes/vote/is_poll_votable_checker.py
31 32 33 34 35 36 37 38 | |
load_poll(poll_id)
Load the poll with the given id (ensure it exists)
Source code in apps/votes_results/classes/vote/is_poll_votable_checker.py
15 16 17 18 19 20 21 22 23 24 25 | |