{# templates/election/election_list.html #} {% extends "template_base.html" %} {% block title %}{% if is_national_election %}{{ national_election.election_name }}{% else %}Elections{% endif %}{% endblock %} {% block content %} {% load template_filters %} {% load humanize %}
Retrieve All Elections from Master API Server (Meta information only) Refresh States
{#Pinging API Server .#} {% if is_national_election %} {# ############## List of states under one National Election ############## #} Back to Elections {% else %} {% endif %} {% if election_list %}| Live? | {% if is_national_election %}Notes{% else %}Election Name{% endif %} | {% if not is_national_election %}Date | {% endif %}State(s) | {% if not is_national_election %}Election ID | {% endif %}
Offices
{% if show_election_statistics %}
(w/o Candidates) {% endif %} |
{% if is_national_election or show_election_statistics %}
Last Refresh | Refresh Added to Queue | {#Last Election | #} {#Next Election | #} {% endif %} {% if show_election_statistics %}Candidates (w/o Photos) |
Measures | Ballot Locations (To Process) |
Voter Guides (Public Positions) |
{% endif %}
{% if not is_national_election %}
{% endif %} | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| {{ forloop.counter }} | {% if election.include_in_list_for_voters %}Yes{% endif %}{% if election.include_in_list_for_voters and election.election_preparation_finished %}, {% endif %} {% if election.election_preparation_finished %}DATA{% endif %}{% if election.include_in_list_for_voters or election.election_preparation_finished and election.candidate_photos_finished %}, {% endif %} {% if election.candidate_photos_finished %}PHOTOS{% endif %} |
{% if not is_national_election %}
{{ election.election_name }}
{% if election.vote_usa_same_day_election_suffix_list %}
({{ election.vote_usa_same_day_election_suffix_list }})
{% endif %}
{% endif %}
{% if election.internal_notes %}
{{ election.internal_notes|default_if_none:""|truncatechars:50 }} {% endif %} |
{% if not is_national_election %}
{{ election.election_day_text }} {% if election.days_until_election > 0 %} (in {{ election.days_until_election }} days){% endif %} | {% endif %}{% if election.is_national_election and not is_national_election %} {% else %} {{ election.state_code }} {% endif %} | {% if not is_national_election %}{{ election.google_civic_election_id }} {% if election.vote_usa_election_id %} / {{ election.vote_usa_election_id }}{% endif %} | {% endif %}{% if not show_election_statistics and election.office_count %} {{ election.office_count|default_if_none:"" }} {% endif %} {% if election.offices_with_candidates_count %} {{ election.offices_with_candidates_count|default_if_none:"" }} {% endif %} {% if election.offices_without_candidates_count %} ({{ election.offices_without_candidates_count|default_if_none:"" }}) {% endif %} | {% if is_national_election or show_election_statistics %} {# Last Retrieve / Refresh #}{# {% if election.retrieve_date_completed %}#} {# retrieve: {{ election.retrieve_date_completed }}#} {# {% elif election.retrieve_date_started %}#} {# retrieve start: {{ election.retrieve_date_completed }}#} {# {% endif %}#} {##} {# {% if election.retrieve_date_completed or election.retrieve_date_started and election.refresh_date_completed or election.refresh_date_started %}#} {# /#} {# {% endif %}#} {% if election.refresh_date_completed %} {{ election.refresh_date_completed }} {% elif election.refresh_date_started %} start: {{ election.refresh_date_started }} {% elif election.retrieve_date_completed %} {{ election.retrieve_date_completed }} {% elif election.retrieve_date_started %} start: {{ election.retrieve_date_started }} {% endif %} | {% if election.refresh_date_added_to_queue %} {{ election.refresh_date_added_to_queue }} {% endif %} | {##} {# {% if election.prior_election_in_state and election.prior_election_in_state.election_day_text %}#} {# {{ election.prior_election_in_state_date|date:"N j, Y" }}#} {# {% endif %}#} {# | #} {##} {# {% if election.next_election_in_state and election.next_election_in_state.election_day_text %}#} {# {% if election.next_election_in_state.election_day_text == election.election_day_text %}#} {# #} {# This election#} {# #} {# {% else %}#} {# {{ election.next_election_in_state_date|date:"N j, Y" }}#} {# {% endif %}#} {# {% endif %}#} {# | #} {% endif %} {% if show_election_statistics %}
{% if election.candidate_count %}
{{ election.candidate_count|default_if_none:"" }}
{% endif %}
{% if election.candidates_without_photo_count %}
({{ election.candidates_without_photo_count|default_if_none:"" }}
{% if election.candidates_without_photo_percentage %}
: {{ election.candidates_without_photo_percentage|floatformat:"0" }}%{% endif %})
{% endif %}
{% if election.candidate_count %}
open json {% endif %} |
{% if election.measure_count %} {{ election.measure_count|default_if_none:"" }} {% endif %} | {% if election.ballot_returned_count %}{{ election.ballot_returned_count|default_if_none:"" }} {% if election.ballot_location_display_option_on_count %} / {{ election.ballot_location_display_option_on_count|default_if_none:"" }}{% endif %} {% endif %} {% if election.batches_not_processed %} {% if election.batches_not_processed_batch_set_id %} ({{ election.batches_not_processed|default_if_none:"" }}) {% else %} ({{ election.batches_not_processed|default_if_none:"" }}) {% endif %} {% endif %} | {% if election.voter_guides_count %} {{ election.voter_guides_count|default_if_none:"" }} {% endif %} {% if election.public_positions_count %} ({{ election.public_positions_count|default_if_none:"" }}) {% endif %} | {% endif %} {% if not is_national_election %}(edit) | {% endif %}
(no elections found)
{% endif %} {# ############## List of many election dates ############## #}Preview 'upcoming elections API' response from: CTCL, Vote USA
Retrieve upcoming elections from: CTCL, Google Civic, or Vote USA
{% endblock %}