{# templates/candidate/candidate_list.html #} {% extends "template_base.html" %} {% block title %}Candidates{% endblock %} {% block content %} {% load template_filters %} {% load humanize %}

Candidates

Import New Candidates

{% csrf_token %}
{# These are input checkboxes from a form further down this page #} {% if find_candidates_linked_to_multiple_offices %}{% endif %} {% if election_list %} {% endif %}{# End of if election_list #} {# Default to showing only upcoming elections #}      {% if election_years_available %} {% endif %}{# End of if election_years_available #}      {# Show candidates which are either marquee or battleground #}           {% if state_list %} {% if state_code != "" %} show all states {% endif %} {% endif %}{# End of if state_list #}
{% if google_civic_election_id %} {% if show_election_statistics %} {% endif %} {% if show_election_statistics %} {% endif %}
Live? Election Name Date Google Civic ID Offices{% if election.offices_without_candidates_count %}
(w/o Candidates){% endif %}
Candidates{% if election.candidates_without_photo_count %}
(w/o Photos){% endif %}
Measures Ballot
Locations
Voter Guides
(Public Positions)
{{ 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 election.id %} {{ election.election_name }} {% endif %} {% if election.internal_notes %}
{{ election.internal_notes|default_if_none:""|truncatechars:50 }} {% endif %}
{{ election.election_day_text }} {% if election.days_until_election > 0 %} (in {{ election.days_until_election }} days){% endif %} {{ election.google_civic_election_id }} {% 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 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 candidate_list and google_civic_election_id and hide_candidate_tools != 1 and hide_candidate_tools != '1' %}
    {% if google_civic_election_id < 1000000 %}
  1. Transfer Twitter handles from Google Civic Data (30 seconds)
  2. {% endif %}
  3. Go to Candidate Sites and get Twitter Handles for this Election (1-2 minutes)
  4. {#
  5. #} {# Retrieve Possible Twitter Handles (25 at a time - about 30 seconds - Open in New Window)
  6. #}
  7. Retrieve Facebook Photos for up to {{facebook_urls_without_picture_urls}} Candidates (If the count does not decrease with each click, you are done for this election)
  8. Retrieve Possible Candidates from Google (20 at a time - 1-2 minutes)
  9. Retrieve/Refresh Candidate Twitter Info for this Election (1-2 minutes)
  10. {#
  11. #} {# Retrieve Positions from Vote Smart for this Election (5-15 minutes - Open in New Window)
  12. #}
  13. Generate Voter Guides for this Election (about 1 minute)
  14. Refresh Positions from Candidate Info for this Election (1-2 minutes)
(Hide these Candidate Tools)
{% elif hide_candidate_tools %}
(Show Candidate Tools)
{% elif candidate_list %} {% endif %} {% if show_this_year_of_candidates %} {% endif %} To Add New Candidate Start from Office Page,    Add Candidate (no Office),    Export Candidates ,    Repair Imported Candidate Names,    {% if find_candidates_linked_to_multiple_offices %} Show All Candidates    {% else %} Show Candidates Linked to Two Offices    {% endif %} {% if vote_usa_candidates_for_this_state %} Vote USA Candidates API     {% else %} (Vote USA Candidates API requires election and state) {% endif %} {% if google_civic_election_id %}    Create US House Candidates    {% endif %}

{% if candidate_search %} clear search  {% endif %} {% if not review_mode and not hide_pagination %} {% if current_page_number > 0 %}Previous page |{% endif %} Page {{ current_page_number|add:1 }} | Next page {% endif %}
{# Turn on/off review mode #}      {# Show candidates without Twitter handle #}      {# Show candidates with Twitter options #}               

{% if candidate_list %} {% if not review_mode %} {% for candidate in candidate_list %} {% if forloop.counter == 1 or forloop.counter|divisibleby:9 %} {# Show the header every ~8 lines #} {% if not google_civic_election_id %} {% endif %} {% endif %} {% if not google_civic_election_id %} {% endif %} {% endfor %}
    Candidate Name StateElectionOffice Twitter Handle Google Search Results Website / Facebook / Instagram / Email IDs
{{ forloop.counter|add:candidate_count_start }} {% if candidate.candidate_photo_url %} {% endif %} {{ candidate.candidate_name }} {% if candidate.withdrawn_from_election %}
Withdrew {% if candidate.withdrawal_date %}({{ candidate.withdrawal_date }}){% endif %} {% endif %} {% if candidate.do_not_display_on_ballot %}
Don't Display on Ballot {% endif %}
{{ candidate.we_vote_id }} {% if candidate.politician_we_vote_id %}
{{ candidate.politician_we_vote_id }} {% else %}
(no politician link) {% endif %} {% if candidate.linked_campaignx_we_vote_id %}
{{ candidate.linked_campaignx_we_vote_id }} {% endif %} {% if candidate.ballotpedia_candidate_summary %}
{{ candidate.ballotpedia_candidate_summary|default_if_none:""|truncatechars:50 }} {% endif %}
{{ candidate.get_candidate_state }} {{ candidate.election.election_name }} - {{ candidate.election.google_civic_election_id }}, {{ candidate.election.election_day_text }} {% if candidate.supporters_count %}
supporters_count: {{ candidate.supporters_count }}
{% endif %} {% if candidate.ocd_division_id %}
{{ candidate.ocd_division_id }}
{% endif %}
{% if candidate.office %} {{ candidate.office.office_name }}
{{ candidate.office.we_vote_id }} {% if candidate.office.district_name or candidate.office.district_id %}
{% endif %} {% if candidate.office.district_name %} {{ candidate.office.district_name }} {% endif %} {% if candidate.office.district_id %} - District {{ candidate.office.district_id }} {% endif %} {% if candidate.office.district_name or candidate.office.district_id %} {% endif %} {% else %} (office missing) {% endif %} {% if candidate.is_battleground_race %}
Competitive {% endif %}
{% if candidate.candidate_twitter_handle %} {{ candidate.candidate_twitter_handle }}
({{ candidate.twitter_followers_count|intcomma }} followers) {% else %} {% if candidate.candidate_merge_possibility %} {% elif candidate.no_twitter_possibilities_found %}
  • no twitter options found
{% endif %} {% endif %}
{% if candidate.google_search_merge_possibility %} {% if not candidate.google_search_merge_possibility.chosen_and_updated %}   ( Best Guess: {{ candidate.google_search_merge_possibility.likelihood_score }})
{{ candidate.google_search_merge_possibility.item_link|default_if_none:"" }}
{{ candidate.google_search_merge_possibility.item_snippet|truncatechars:400 }} {% if candidate.google_search_merge_possibility.likelihood_score >= 50 %}
{% csrf_token %}
{% endif %} {% else %}   {{ candidate.google_search_merge_possibility.item_link|default_if_none:"" }}
{% endif %} {% elif candidate.no_google_possibilities_found %}
  • no google options found
{% endif %}
{% if candidate.candidate_url %}{{ candidate.candidate_url }}
{% endif %}
{% if candidate.candidate_contact_form_url %}{{ candidate.candidate_contact_form_url }}
{% endif %}
{% if candidate.facebook_url %}{{ candidate.facebook_url }}
{% endif %} {% if candidate.instagram_url %}{{ candidate.instagram_url }}
{% endif %} {% if candidate.candidate_email %}{{ candidate.candidate_email }}{% endif %}
{% if candidate.ballotpedia_candidate_id %} {% if candidate.ballotpedia_candidate_url %} BP: {{ candidate.ballotpedia_candidate_id|default_if_none:"" }} {% else %} BP: {{ candidate.ballotpedia_candidate_id|default_if_none:"" }} {% endif %}
{% endif %} {% if candidate.vote_smart_id %} Vote Smart: {{ candidate.vote_smart_id|default_if_none:"" }}
{% endif %} {% if candidate.ctcl_uuid %}CTCL: {{ candidate.ctcl_uuid|default_if_none:"" }}
{% endif %} {% if candidate.vote_usa_politician_id %}{{ candidate.vote_usa_politician_id|default_if_none:"" }}
{% endif %} {% if candidate.vote_usa_office_id %}{{ candidate.vote_usa_office_id|default_if_none:"" }}
{% endif %}
{% if not hide_pagination %} {% if current_page_number > 0 %}Previous page |{% endif %} Page {{ current_page_number|add:1 }} | Next page {% endif %}

{# End of NOT review_mode #} {% else %} {# The following is "review mode" #} {% if not google_civic_election_id %} {% endif %} {% for candidate in candidate_list %} {% if not google_civic_election_id %} {% endif %} {% endfor %}
    Candidate Name Twitter Count: {{ total_twitter_handles }} Public Positions State ElectionOfficeBallotpedia Vote Smart
{{ forloop.counter|add:candidate_count_start }} {% if candidate.candidate_photo_url %} {% endif %} {{ candidate.candidate_name }}
{{ candidate.we_vote_id }} {% if candidate.politician_we_vote_id %}
{{ candidate.politician_we_vote_id }} {% endif %} {% if candidate.ballotpedia_candidate_summary %}
{{ candidate.ballotpedia_candidate_summary|default_if_none:""|truncatechars:50 }} {% endif %}
{% if candidate.candidate_twitter_handle %} {{ candidate.candidate_twitter_handle }}
({{ candidate.twitter_followers_count|intcomma }} followers) {% endif %}
{{ candidate.positions_count|intcomma }} {{ candidate.get_candidate_state }}{{ candidate.election.election_name }} - {{ candidate.election.google_civic_election_id }} {% if candidate.office %} {{ candidate.office.office_name }} {% if candidate.office.district_id %} - District {{ candidate.office.district_id }} {% endif %} {% if candidate.office.state_code %} - {{ candidate.office.state_code }} {% endif %} {% else %} (office missing) {% endif %} {% if candidate.ballotpedia_candidate_id %} {% if candidate.ballotpedia_candidate_url %} {{ candidate.ballotpedia_candidate_id|default_if_none:"" }} {% else %} {{ candidate.ballotpedia_candidate_id|default_if_none:"" }} {% endif %} {% endif %} {{ candidate.vote_smart_id|default_if_none:"" }}
{% endif %}{# End of review_mode #} {% else %} {# The following is shown if there is no candidate list #}

(no candidates found)

{% endif %}




{% endblock %}