{# templates/candidate/candidate_selection_list.html #} {% block content %} {% load template_filters %} {% load humanize %}
{% 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.candidate_year %}
{{ candidate.candidate_year }} {% endif %} {% 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.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.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 #} {% endif %} {% endblock %}