{# templates/politician/politician_edit.html #} {% extends "template_base.html" %} {% block title %}{% if politician %}{{ politician.politician_name }}: Politician Edit Page{% else %}New Politician{% endif %}{% endblock %} {% block content %} {% load humanize %} {% load template_filters %} < Back to Politicians

{% if politician %}Edit Politician: {% if politician.we_vote_hosted_profile_image_url_medium %} {% endif %} {{ politician.politician_name }} {% else %}New Politician{% endif %}

{% if error_message %}

{{ error_message }}

{% endif %}
{% csrf_token %} {# There is another submit button at bottom of form #}

cancel

{% if politician.we_vote_hosted_profile_twitter_image_url_tiny %} Unknown {% else %} Unknown {% endif %} {# Uploaded photo #} Uploaded {% if politician.we_vote_hosted_profile_uploaded_image_url_tiny %} {% else %} {% endif %} {# Facebook photo #} {% if politician.we_vote_hosted_profile_facebook_image_url_tiny %} Facebook {% endif %} {% if politician.we_vote_hosted_profile_twitter_image_url_tiny %} Twitter {% endif %} {% if politician.we_vote_hosted_profile_vote_usa_image_url_tiny %} Vote USA {% endif %}
{% if politician %} {% if politician.politician_name_normalized|length|get_digit:"-1" > 0 %} {% endif %}
{{ politician.we_vote_id }} (politician id: {{ politician.id }}) (delete politician) {{ we_vote_id }} {% if politician.linked_campaignx_we_vote_id %}     We generated a campaign: {{ politician.linked_campaignx_we_vote_id }} for {{ politician.politician_name|default_if_none:"" }}. {% endif %}
{% include "office_held/is_battleground_race_year_checkboxes.html" with office_held=politician %} {% endif %}
{% if politician %}{% if politician.gender_likelihood == '' %}None{% else %}{{ politician.gender_likelihood }}{% endif %}{% endif %}
{% if path_list %} {% include "politician/seo_friendly_path_list.html" with path_list=path_list %} {% else %}
No alternate URL paths found.
{% endif %}
{% if politician.politician_twitter_handle %}
View on Twitter     Refresh Twitter Details
Twitter Name: {{ politician.twitter_name }}
Twitter Description: {{ politician.twitter_description }}
Twitter Location: {{ politician.twitter_location }}
Twitter Followers: {{ politician.twitter_followers_count|intcomma }}
{% endif %} {% if politician.twitter_url %}Twitter URL (from Google Civic): {{ politician.twitter_url }}{% endif %}
{% if politician.politician_twitter_handle2 %}
View on Twitter     Make Primary Handle {% endif %}
{% if politician.politician_twitter_handle3 %} View on Twitter     Make Primary Handle {% endif %}
{% if politician.politician_twitter_handle4 %} View on Twitter     Make Primary Handle {% endif %}
{% if politician.politician_twitter_handle5 %} View on Twitter     Make Primary Handle {% endif %}

cancel


{% if politician %} {% if linked_candidate_list %}

Candidates Linked to this Politician (Start Add Candidate Process )

{% for candidate in linked_candidate_list %} {% endfor %}
    Candidate Name State Election Office Twitter Handle Website Id We Vote Ids Other Ids
{{ forloop.counter }} {% if candidate.candidate_photo_url %} {% endif %} {{ candidate.candidate_name }}
unlink from politician
{{ candidate.get_candidate_state }} {{ candidate.election.election_name }} - {{ candidate.election.google_civic_election_id }}
{% if candidate.candidate_year %}Year: {{ candidate.candidate_year }}{% else %}{{ candidate.election.election_day_text }}{% endif %}
{% if candidate.office %} {{ candidate.office.office_name }} {% else %} (office missing) {% endif %} {% if candidate.candidate_twitter_handle %}{{ candidate.candidate_twitter_handle }} 
({{ candidate.twitter_followers_count|intcomma }} followers){% endif %}
{% if candidate.candidate_url %}{{ candidate.candidate_url }} {% endif %} {% if candidate.candidate_contact_form_url %}{{ candidate.candidate_contact_form_url }} {% endif %} {{ candidate.id }} {{ candidate.we_vote_id }} {% if candidate.politician_we_vote_id %} {{ candidate.politician_we_vote_id }} {% endif %} {% if candidate.vote_smart_id %}VS: {{ candidate.vote_smart_id|default_if_none:"" }}
{% endif %} {% if candidate.vote_usa_politician_id %}{{ candidate.vote_usa_politician_id|default_if_none:"" }}
{% endif %} update politician from this candidate
update this candidate from politician 

 

 

{% else %}

Start Add Candidate Process 

(no linked candidates found)

{% endif %} {% if related_candidate_list %}

Candidates That Might Match This Politician

{% for candidate in related_candidate_list %} {% endfor %}
    Candidate Name State Election Office Twitter Handle Website Id We Vote Ids Vote Smart Vote USA Id
{{ forloop.counter }} {% if candidate.candidate_photo_url %} {% endif %} {{ candidate.candidate_name }}  
link to politician
{{ candidate.get_candidate_state }} {{ candidate.election.election_name }} - {{ candidate.election.google_civic_election_id }}
{% if candidate.candidate_year %}Year: {{ candidate.candidate_year }}{% else %}{{ candidate.election.election_day_text }}{% endif %}
{% if candidate.office %} {{ candidate.office.office_name }} {% else %} (office missing) {% endif %} {% if candidate.candidate_twitter_handle %}{{ candidate.candidate_twitter_handle }} 
({{ candidate.twitter_followers_count|intcomma }} followers){% endif %}
{% if candidate.candidate_url %}{{ candidate.candidate_url }} {% endif %} {% if candidate.candidate_contact_form_url %}
{{ candidate.candidate_contact_form_url }} {% endif %}
{{ candidate.id }} {{ candidate.we_vote_id }} {% if candidate.politician_we_vote_id %} {{ candidate.politician_we_vote_id }} {% else %} ("pol" missing) {% endif %} {{ candidate.vote_smart_id|default_if_none:"" }} {{ candidate.vote_usa_politician_id|default_if_none:"" }}
analyze duplicates

 

 

{% endif %} {# ####################### #} {# ### Representatives ### #} {% if linked_representative_list %}

Representatives Linked to this Politician

{% for representative in linked_representative_list %} {% if representative.representative_contact_form_url %}
{{ representative.representative_contact_form_url }} {% endif %} {% endfor %}
    Representative Name State Office Held Twitter Handle Websites Ids
{{ forloop.counter }} {% if representative.we_vote_hosted_profile_image_url_medium %} {% endif %} {{ representative.representative_name }}
unlink rep from politician
{{ representative.state_code }} {% if representative.ocd_division_id %}
{{ representative.ocd_division_id }}
{% endif %} In office: {% if representative.year_in_office_2023 %}2023 {% endif %} {% if representative.year_in_office_2024 %}2024 {% endif %} {% if representative.year_in_office_2025 %}2025 {% endif %} {% if representative.year_in_office_2026 %}2026 {% endif %} {% if representative.office_held_we_vote_id %}    {{ representative.office_held_we_vote_id }} {% endif %}
{% if representative.representative_twitter_handle %}{{ representative.representative_twitter_handle }} 
({{ representative.twitter_followers_count|intcomma }} followers){% endif %}
{% if representative.representative_url %}{{ representative.representative_url }} {% endif %} {{ representative.id }}  {{ representative.we_vote_id }}  {% if representative.politician_we_vote_id %} {{ representative.politician_we_vote_id }}  {% endif %} {{ representative.vote_usa_politician_id|default_if_none:"" }}

 

 

{% else %}

(no linked representatives found)

{% endif %} {% if related_representative_list %}

Representatives That Might Match This Politician

{% for representative in related_representative_list %} {% endfor %}
    Representative Name State Election Office Twitter Handle Website Id
{{ forloop.counter }} {% if representative.we_vote_hosted_profile_image_url_medium %} {% endif %} {{ representative.representative_name }}  
link to politician
{{ representative.state_code }} In office: {% if representative.year_in_office_2023 %}2023 {% endif %} {% if representative.year_in_office_2024 %}2024 {% endif %} {% if representative.year_in_office_2025 %}2025 {% endif %} {% if representative.year_in_office_2026 %}2026 {% endif %} {% if representative.ocd_division_id %}
{{ representative.ocd_division_id }}
{% endif %}
{% if representative.representative_twitter_handle %}{{ representative.representative_twitter_handle }} 
({{ representative.twitter_followers_count|intcomma }} followers){% endif %}
{% if representative.representative_url %}{{ representative.representative_url }} {% endif %} {% if representative.representative_contact_form_url %}
{{ representative.representative_contact_form_url }} {% endif %}
{{ representative.id }} {{ representative.we_vote_id }} {% if representative.politician_we_vote_id %} {{ representative.politician_we_vote_id }} {% else %} ("pol" missing) {% endif %} {{ representative.vote_usa_politician_id|default_if_none:"" }}

 

 

{% endif %} {# ### End of representatives section ### #} {# ###################################### #} {# ####################### #} {# ### Linked & Related CampaignX Lists ### #} {% if linked_campaignx_list %}

Campaigns Linked to this Politician

{% for campaignx in linked_campaignx_list %} {% endfor %}
    Campaign Title SEO Friendly Path Ids
{{ forloop.counter }} {% if campaignx.we_vote_hosted_campaign_photo_medium_url %} {% elif campaignx.we_vote_hosted_profile_image_url_medium %} {% endif %} {{ campaignx.campaign_title }}
{{ campaignx.supporters_count|intcomma }} supporters
{% if campaignx.seo_friendly_path %} {{ campaignx.seo_friendly_path }} {% endif %} {{ campaignx.id }}  {{ campaignx.we_vote_id }}  {% if campaignx.linked_politician_we_vote_id %} {{ campaignx.linked_politician_we_vote_id }}  {% endif %}

 

 

{% else %}

(no linked campaignx entries found)

{% endif %} {% if related_campaignx_list %}

Campaigns That Might Match This Politician

{% for related_campaignx in related_campaignx_list %} {% endfor %}
    Campaign Title SEO Friendly Path Id
{{ forloop.counter }} {% if related_campaignx.we_vote_hosted_campaign_photo_medium_url %} {% elif related_campaignx.we_vote_hosted_profile_image_url_medium %} {% endif %} {{ related_campaignx.campaign_title }}  
{{ related_campaignx.supporters_count|intcomma }} supporters {% if politician_linked_campaignx_we_vote_id %}    compare for merge {% endif %}
{% if related_campaignx.seo_friendly_path %}{{ related_campaignx.seo_friendly_path }} {% endif %} {{ related_campaignx.id }}   {{ related_campaignx.we_vote_id }} {% if related_campaignx.linked_politician_we_vote_id %} {{ related_campaignx.linked_politician_we_vote_id }} {% else %} ("pol" missing) {% endif %}

 

 

{% endif %} {# ### End of CampaignX section ### #} {# ###################################### #}
{% if duplicate_politician_list %}

Possible Duplicate Politicians

{% for found_politician in duplicate_politician_list %} {% endfor %}
    Politician Name State Twitter Handle Website Id We Vote Id Vote Smart Id
{{ forloop.counter }} {% if found_politician.politician_photo_url %} {% endif %} {{ found_politician.politician_name }}
compare for merge
{{ found_politician.state_code|default_if_none:"" }} {% if found_politician.politician_twitter_handle %}{{ found_politician.politician_twitter_handle }} 
({{ found_politician.twitter_followers_count|intcomma }} followers){% endif %} {% if found_politician.politician_twitter_handle2 %}
{{ found_politician.politician_twitter_handle2 }} {% endif %} {% if found_politician.politician_twitter_handle3 %}
{{ found_politician.politician_twitter_handle3 }} {% endif %} {% if found_politician.politician_twitter_handle4 %}
{{ found_politician.politician_twitter_handle4 }} {% endif %} {% if found_politician.politician_twitter_handle5 %}
{{ found_politician.politician_twitter_handle5 }} {% endif %}
{% if found_politician.politician_url %}{{ found_politician.politician_url }} {% endif %} {% if found_politician.politician_url2 %}
{{ found_politician.politician_url2 }} {% endif %} {% if found_politician.politician_url3 %}
{{ found_politician.politician_url3 }} {% endif %} {% if found_politician.politician_url4 %}
{{ found_politician.politician_url4 }} {% endif %} {% if found_politician.politician_url5 %}
{{ found_politician.politician_url5 }} {% endif %}
{{ found_politician.id }} {{ found_politician.we_vote_id }} {{ found_politician.vote_smart_id }}
{% endif %} Retrieve photos
{% if politician.politician_photo_url %} {% endif %} {% if politician.we_vote_hosted_profile_image_url_large %}
we_vote_hosted_profile_image_url_large {% endif %}

We Vote Positions Related to {{ politician.politician_name }}

{% if politician.vote_smart_id %}

Transfer Vote Smart Ratings to We Vote Positions

{% endif %}

Add Position (start with Endorser taking the Position)

{% if politician_position_list %} {% for politician_position in politician_position_list %} {% if not politician_position.id %} {% else %} {% endif %} {% endfor %}
Endorser Stance Election Election Date
(missing politician_position.id)
{{ forloop.counter }} {% if politician_position.organization_id %} {{ politician_position.organization.organization_name }} {% else %} (not an org) {% endif %} {% if politician_position.organization.twitter_followers_count %}
( {{ politician_position.organization.twitter_followers_count|intcomma }} Twitter Followers) {% endif %}
{{ politician_position.get_stance_display }} {% if politician_position.statement_text %} {{ politician_position.statement_text }} {% endif %} {# {% if politician_position.vote_smart_rating %} {{ politician_position.vote_smart_rating }}%{% endif %}#} {% if politician_position.more_info_url %}
{{ politician_position.more_info_url }} {% endif %}
{{ politician_position.election.google_civic_election_id }} {{ politician_position.election.election_day_text }}
{% else %}

(no positions found)

{% endif %} {% if politician.vote_smart_id and politician.vote_smart_id != False and politician.vote_smart_id != 'False' and politician.vote_smart_id != None and politician.vote_smart_id != 'None' %}

Vote Smart Ratings

Import Vote Smart Ratings for this Politician

{% if rating_list %} {% for special_interest_group_rating in rating_list %} {% endfor %}
ratingId sigId ratingName timeSpan candidateId rating
{{ forloop.counter }} {{ special_interest_group_rating.ratingId }} {{ special_interest_group_rating.sigId }} {{ special_interest_group_rating.ratingName }} {{ special_interest_group_rating.timeSpan }} {{ special_interest_group_rating.candidateId }} {{ special_interest_group_rating.rating }}
{% else %}

(no special interest group ratings found)

{% endif %} {% endif %}{# End of if politician.vote_smart_id #}
{% if politician.twitter_profile_image_url_https_original %}
Twitter Image (Original)
{% endif %} {% if politician.twitter_profile_banner_url_https %}
Twitter Banner
{% endif %} {% else %} {# Only show other politicians running for this office when we are entering a new politician #} {% if politician_list %}
Existing Politicians
{% for politician in politician_list %} {% endfor %}
    Politician Name State Twitter Handle Website Id We Vote Id Vote Smart Id  
{{ forloop.counter }} {% if politician.politician_photo_url %} {% endif %} {{ politician.politician_name }} {{ politician.state_code }} {% if politician.politician_twitter_handle %}{{ politician.politician_twitter_handle }} 
({{ politician.twitter_followers_count|intcomma }} followers){% endif %} {% if politician.politician_twitter_handle2 %}
{{ politician.politician_twitter_handle2 }} {% endif %} {% if politician.politician_twitter_handle3 %}
{{ politician.politician_twitter_handle3 }} {% endif %} {% if politician.politician_twitter_handle4 %}
{{ politician.politician_twitter_handle4 }} {% endif %} {% if politician.politician_twitter_handle5 %}
{{ politician.politician_twitter_handle5 }} {% endif %}
{% if politician.politician_url %}{{ politician.politician_url }} {% endif %} {{ politician.id }} {{ politician.we_vote_id }} {{ politician.vote_smart_id }} (edit)

{% else %} {# Don't display anything if there aren't any other politicians captured for this office yet #} {% endif %} {% endif %}{# End of if politician #} {% endblock %}