{# templates/candidate/candidate_edit.html #} {% extends "template_base.html" %} {% block title %}{% if candidate %}{{ candidate.candidate_name }}: Candidate Edit Page{% else %}New Candidate{% endif %}{% endblock %} {% block content %} {% load template_filters %} {% load humanize %} < Back to Candidates

{% if candidate %}Edit Candidate: {% if candidate.we_vote_hosted_profile_image_url_medium %} {% endif %} {{ candidate.candidate_name }} {% else %}New Candidate{% endif %}

{% if error_message %}

{{ error_message }}

{% endif %}
{% csrf_token %}

{# There is another submit button at bottom of form #} {% if candidate %} cancel {% else %} cancel {% endif %}

{% if candidate %} {% if candidate.candidate_name_normalized|length|get_digit:"-1" > 0 %} {% endif %}
{{ candidate.we_vote_id }} (delete candidate) {% if candidate.politician_we_vote_id %}     Politician We Vote Id: {{ candidate.politician_we_vote_id }} {% else %}     (match to politician) {% endif %} {% if candidate.ocd_division_id %}     {{ candidate.ocd_division_id }} {% endif %} {% if candidate.candidate_merge_possibility_found %}     (check for duplicate candidates ) {% endif %} {% if path_list %} {% include "politician/seo_friendly_path_list.html" with path_list=path_list %} {% else %}
No alternate URL paths found.
{% endif %}
{% else %} {{ we_vote_id }} {% if politician_we_vote_id and politician_we_vote_id != "False" and politician_we_vote_id != False %}     Politician We Vote Id FOUND: {{ politician_we_vote_id }} {% else %} {% endif %} {% endif %}
{% if candidate.we_vote_hosted_profile_twitter_image_url_tiny %} Unknown {% else %} Unknown {% endif %} Uploaded {% if candidate.we_vote_hosted_profile_uploaded_image_url_tiny %} (delete on politician)    {% else %} (add on politician) {% endif %} {% if candidate.we_vote_hosted_profile_facebook_image_url_tiny %} Facebook {% endif %} {% if candidate.we_vote_hosted_profile_twitter_image_url_tiny %} Twitter {% endif %} {% if candidate.we_vote_hosted_profile_vote_usa_image_url_tiny %} Vote USA {% endif %}
{% if office_name %} Adding Candidate to: {{ office_name }} {% endif %} {% for candidate_to_office_link in candidate_to_office_link_list %} {% endfor %}
id: {{ candidate_to_office_link.id }} {{ candidate_to_office_link.election.election_name }}, {{ candidate_to_office_link.election.election_day_text }} ({{ candidate_to_office_link.google_civic_election_id }}) {{ candidate_to_office_link.state_code }} {% if candidate_to_office_link.office and candidate_to_office_link.contest_office_we_vote_id %} {% if candidate_to_office_link.office.office_name %}{{ candidate_to_office_link.office.office_name }}{% else %}MISSING OFFICE OBJECT{% endif %} ({{ candidate_to_office_link.contest_office_we_vote_id }}) {% else %} Missing contest_office_we_vote_id {% endif %} {% if candidate_to_office_link.office.vote_usa_office_id %}
{{ candidate_to_office_link.office.vote_usa_office_id }}{% endif %} {% if candidate_to_office_link.office.ctcl_uuid %}
{{ candidate_to_office_link.office.ctcl_uuid }}{% endif %}
{% if state_code_from_election == "" %}
{% endif %}
True False Use YYYY-MM-DD format    
{% if candidate.candidate_twitter_handle %}
View on Twitter     Refresh Twitter Details    Delete Cached Images
Twitter Name: {{ candidate.twitter_name }}
Twitter Description: {{ candidate.twitter_description }}
Twitter Location: {{ candidate.twitter_location }}
Twitter Followers: {{ candidate.twitter_followers_count|intcomma }}
{% endif %} {% if candidate.twitter_url %}Twitter URL (from Google Civic): {{ candidate.twitter_url }}{% endif %} {% if candidate %} (retrieve possible Twitter handles) (delete possible Twitter handles) {% endif %} {% if twitter_link_possibility_list %}
{% for one_row in twitter_link_possibility_list %} {% endfor %}
# score name screen_name location / utc_offset followers count description all
{{ forloop.counter }} {% if one_row.not_a_match %} no match
{% endif %} {{ one_row.likelihood_score|default_if_none:"n/a" }}
{{ one_row.twitter_name }} {{ one_row.twitter_handle|default_if_none:"n/a" }}
{% if not one_row.not_a_match %} {% endif %}
{{ one_row.twitter_location|default_if_none:"n/a" }} {% if one_row.twitter_utc_offset %} {{ one_row.twitter_utc_offset|default_if_none:"n/a" }}{% endif %} {{ one_row.twitter_followers_count|default_if_none:"" }} {{ one_row.twitter_description|default_if_none:"n/a" }} {% if one_row.twitter_url %}{{ one_row.twitter_url|default_if_none:"" }} {% endif %}
{% endif %} {% if twitter_link_possibility_list|length == 1 %} Show more Twitter search results {% elif twitter_link_possibility_list|length > 1 %} Show fewer Twitter search results {% endif %}
{% if candidate.candidate_twitter_handle2 %}
View on Twitter     Make Primary Handle {% endif %}
{% if candidate.candidate_twitter_handle3 %} View on Twitter     Make Primary Handle {% endif %}
{% if candidate %}
(retrieve possible google search users) (delete possible google search users) (these possible candidates don't match) {% if google_search_possibility_list %} {% include "candidate/google_search_users_for_candidate_table.html" with candidate=candidate google_search_possibility_list=google_search_possibility_list %} {% if google_search_possibility_list|length == 1 and google_search_possibility_total_count > 1 %} Show more Google search users {% elif google_search_possibility_list|length > 1 %} Show fewer Google search users {% endif %} {% endif %}
{% endif %}
{% if candidate.facebook_url %} Refresh Facebook Photo {% if candidate.facebook_url_is_broken %}    The previous attempt at getting a photo from this link failed, it may be a broken link {% endif %} {% if candidate.facebook_profile_image_url_https %} (see photo in new window) {% endif %} {% endif %}
{#
#} {# #} {#
#} {# #} {#
#} {#
#}

{# There is another submit button at top of form #} {% if candidate %} cancel {% else %} cancel {% endif %}


{% if candidate %} Retrieve photos (from Twitter, Vote Smart - TODO work in progress), See images (in new window), Delete Cached Images
{% if candidate.candidate_photo_url %}
{% endif %} {% if candidate.we_vote_hosted_profile_image_url_tiny %} we_vote_hosted_profile_image_url_tiny: {{ candidate.we_vote_hosted_profile_image_url_tiny }}


{% endif %} {% if candidate.we_vote_hosted_profile_image_url_medium %} we_vote_hosted_profile_image_url_medium: {{ candidate.we_vote_hosted_profile_image_url_medium }}


{% endif %} {% if candidate.we_vote_hosted_profile_image_url_large %} we_vote_hosted_profile_image_url_large: {{ candidate.we_vote_hosted_profile_image_url_large }}

{% endif %}

 

 

 

We Vote Positions Related to {{ candidate.candidate_name }}

{% if candidate.vote_smart_id %}

Transfer Vote Smart Ratings to We Vote Positions

{% endif %}

Add Position (start with Endorser taking the Position) (open in new window)

{% if candidate_position_list %} {# #} {% for candidate_position in candidate_position_list %} {% if not candidate_position.id %} {% else %} {# #} {% endif %} {% endfor %}
Endorser Position Stance (w/ source) Election Election DateRating Time Span
(missing candidate_position.id)
{{ forloop.counter }} {% if candidate_position.organization_id %} {{ candidate_position.organization.organization_name }} (edit position) {% else %} (not an org) {% endif %} {% if candidate_position.organization.twitter_followers_count %}
( {{ candidate_position.organization.twitter_followers_count|intcomma }} Twitter Followers) {% endif %}
{{ candidate_position.get_stance_display }} {% if candidate_position.statement_text %} {{ candidate_position.statement_text }} {% endif %} {# {% if candidate_position.vote_smart_rating %} {{ candidate_position.vote_smart_rating }}%{% endif %}#} {% if candidate_position.more_info_url %}
{{ candidate_position.more_info_url }} {% endif %}
{{ candidate_position.election.google_civic_election_id }} {{ candidate_position.election.election_day_text }}{{ candidate_position.vote_smart_time_span|default_if_none:"" }}
{% else %}

(no positions found)

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

Vote Smart Ratings

Import Vote Smart Ratings for this Candidate

{% 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 candidate.vote_smart_id #}
{% if candidate.twitter_profile_image_url_https_original %}
Twitter Image (Original)
{% endif %} {% if candidate.twitter_profile_banner_url_https %}
Twitter Banner
{% endif %} {% else %} {# Only show other candidates running for this office when we are entering a new candidate #} {% if candidate_list %}
Existing Candidates
{% for candidate in candidate_list %} {% endfor %}
    Candidate Name State Election Office Twitter Handle Website Id We Vote Id Vote Smart Id  
{{ forloop.counter }} {% if candidate.candidate_photo_url %} {% endif %} {{ candidate.candidate_name }} {{ candidate.get_candidate_state }} {{ candidate.election.election_name }} {% if candidate.office and candidate.office.id %} {{ 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 %} Match to Politician {% endif %} {{ candidate.vote_smart_id }} (edit)

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