Part of lp.registry.interfaces.poll View In Hierarchy
Int | id | Undocumented |
Int | team | Undocumented |
PollNameField | name | A short unique name, beginning with a lower-case letter or number, and containing only letters, numbers, dots, hyphens, or plus signs. |
TextLine | title | Undocumented |
Datetime | dateopens | Undocumented |
Datetime | datecloses | Undocumented |
Text | proposition | Undocumented |
Choice | type | Undocumented |
Bool | allowspoilt | Allow users to leave the ballot blank (i.e. cast a vote for "None of the above") |
Choice | secrecy | Undocumented |
Method | saneDates | Ensure the poll's dates are sane. |
Method | isOpen | Return True if this Poll is still open. |
Method | isClosed | Return True if this Poll is already closed. |
Method | isNotYetOpened | Return True if this Poll is not yet opened. |
Method | closesIn | Return a timedelta object of the interval between now and the date |
Method | opensIn | Return a timedelta object of the interval between now and the date |
Method | newOption | Create a new PollOption for this poll. |
Method | getActiveOptions | Return all PollOptions of this poll that are active. |
Method | getAllOptions | Return all Options of this poll. |
Method | personVoted | Return True if :person has already voted in this poll. |
Method | getVotesByPerson | Return the votes of the given person in this poll. |
Method | getTotalVotes | Return the total number of votes this poll had. |
Method | getWinners | Return the options which won this poll. |
Method | removeOption | Remove the given option from this poll. |
Method | getOptionByName | Return the PollOption by the given name. |
Method | storeSimpleVote | Store and return the vote of a given person in a this poll. |
Method | storeCondorcetVote | Store and return the votes of a given person in this poll. |
Method | getPairwiseMatrix | Return the pairwise matrix for this poll. |
A poll's end date must be after its start date and its start date must be at least 12h from now.
The optional :when argument is used only by our tests, to test if the poll is/was/will be open at a specific date.
The optional :when argument is used only by our tests, to test if the poll is/was/will be closed at a specific date.
The optional :when argument is used only by our tests, to test if the poll is/was/will be not-yet-opened at a specific date.
If title is None it'll be the same as name.
The return value will always be a list of Vote objects. That's for consistency because on simple polls there'll be always a single vote, but for condorcet poll, there'll always be a list.
This must be used only on closed polls.
A ValueError is raised if the given option doesn't belong to this poll. This method can be used only on polls that are not yet opened. The optional :when argument is used only by our tests, to test if the poll is/was/will be not-yet-opened at a specific date.
This method can be used only if this poll is still open and if this is a Simple-style poll.
Unknown Field: option | The choosen option. | |
Unknown Field: when | Optional argument used only by our tests, to test if the poll is/was/will be open at a specific date. |
This method can be used only if this poll is still open and if this is a Condorcet-style poll.
Unknown Field: options | A dictionary, where the options are the keys and the preferences of each option are the values. | |
Unknown Field: when | Optional argument used only by our tests, to test if the poll is/was/will be open at a specific date. |
This method is only available for condorcet-style polls. See http://www.electionmethods.org/CondorcetEx.htm for an example of a pairwise matrix.