election_day.formats.imports.vote.wabstic
¶
Module Contents¶
Functions¶
|
|
|
|
|
Tries to import the given CSV files from a WabstiCExport. |
Attributes¶
- election_day.formats.imports.vote.wabstic.WABSTIC_VOTE_HEADERS_SG_GESCHAEFTE = ('art', 'sortwahlkreis', 'sortgeschaeft')[source]¶
- election_day.formats.imports.vote.wabstic.WABSTIC_VOTE_HEADERS_SG_GEMEINDEN = ('art', 'sortwahlkreis', 'sortgeschaeft', 'bfsnrgemeinde', 'sperrung', 'stimmberechtigte',...[source]¶
- election_day.formats.imports.vote.wabstic.line_is_relevant(line: onegov.core.csv.DefaultRow, domain: str, district: str, number: str) bool [source]¶
- election_day.formats.imports.vote.wabstic.import_vote_wabstic(vote: onegov.ballot.models.Vote, principal: Canton | Municipality, number: str, district: str, file_sg_geschaefte: IO[bytes], mimetype_sg_geschaefte: str, file_sg_gemeinden: IO[bytes], mimetype_sg_gemeinden: str) list[onegov.election_day.formats.imports.common.FileImportError] [source]¶
Tries to import the given CSV files from a WabstiCExport.
This function is typically called automatically every few minutes during an election day - we use bulk inserts to speed up the import.
- Returns:
A list containing errors.