Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Dynamically Created buttons for filters on Map points #3

Open
wants to merge 183 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
183 commits
Select commit Hold shift + click to select a range
127762c
Added voterContactSave API for ignoring specific contacts.
DaleMcGrew Jun 6, 2022
61fd995
Merge pull request #1836 from DaleMcGrew/Dale_WVS_May25-2022
DaleMcGrew Jun 6, 2022
80447c2
Added some status text to debug why voterGuidesFromFriendsUpcomingRet…
DaleMcGrew Jun 7, 2022
4c2eefc
Merge pull request #1837 from DaleMcGrew/Dale_WVS_June6-2022
DaleMcGrew Jun 7, 2022
6ca1bb8
Created update routines to fix problem where voterGuidesFromFriendsUp…
DaleMcGrew Jun 7, 2022
bfe0442
Merge pull request #1838 from DaleMcGrew/Dale_WVS_June6-2022
DaleMcGrew Jun 7, 2022
a04f7ba
Fixed bug with positionListForBallotItemFromFriends.
DaleMcGrew Jun 7, 2022
120669e
Merge pull request #1839 from DaleMcGrew/Dale_WVS_June6-2022
DaleMcGrew Jun 7, 2022
1ec2a81
Fixed crashing bug with friend invitations.
DaleMcGrew Jun 9, 2022
132c000
Merge pull request #1840 from DaleMcGrew/Dale_WVS_June8-2022
DaleMcGrew Jun 9, 2022
c809db5
Added full time (temporary) debug logging in views_apple (3)
SailingSteve Jun 13, 2022
0236a89
Merge pull request #1841 from SailingSteve/stevePythonJune13-445pm
DaleMcGrew Jun 14, 2022
2070a2d
Added some debugging
DaleMcGrew Jun 14, 2022
7d25f0e
Merge pull request #1842 from DaleMcGrew/Dale_WVS_June8-2022
DaleMcGrew Jun 14, 2022
141c9b5
Sign In With Apple experiment 2
SailingSteve Jun 14, 2022
0e84f71
Sign In With Apple experiment 2
SailingSteve Jun 14, 2022
fef66a7
Merge pull request #1843 from SailingSteve/stevePythonJun14-noon
DaleMcGrew Jun 14, 2022
88dcfa1
Sign In With Apple experiment 3
SailingSteve Jun 14, 2022
6797034
Merge pull request #1844 from SailingSteve/stevePythonJun14-136pm
DaleMcGrew Jun 14, 2022
250a75e
Sign In With Apple experiment 4
SailingSteve Jun 14, 2022
19d3fb6
Merge pull request #1845 from SailingSteve/stevePythonJun14-302pm
DaleMcGrew Jun 14, 2022
2aeeb0b
Sign In With Apple experiment 5
SailingSteve Jun 15, 2022
7c21e6d
Merge pull request #1846 from SailingSteve/stevePythonJun15-1145
DaleMcGrew Jun 15, 2022
ebd12ce
Sign In With Apple working, Experiment 6 for git compile date
SailingSteve Jun 16, 2022
2ccd274
Merge pull request #1847 from SailingSteve/stevePythonJun15-1145
DaleMcGrew Jun 16, 2022
1e6f0f5
Added tools to generate mutual friend data, and return summaries for …
DaleMcGrew Jun 19, 2022
5aa546f
Added tools to generate mutual friend data, and return summaries for …
DaleMcGrew Jun 19, 2022
c310224
Merge pull request #1848 from DaleMcGrew/Dale_WVS_Jun15-2022
DaleMcGrew Jun 19, 2022
7a58e73
Fixed crashing bug with generate_mutual_friends_for_one_voter.
DaleMcGrew Jun 19, 2022
1acf516
Merge pull request #1849 from DaleMcGrew/Dale_WVS_June19-2022
DaleMcGrew Jun 19, 2022
82eaf1c
Figured out why Voter Guide Possibilities weren't being assigned to t…
DaleMcGrew Jun 20, 2022
20e6571
Merge pull request #1850 from DaleMcGrew/Dale_WVS_June19-2022
DaleMcGrew Jun 20, 2022
85fe074
Generating mutual friends information for friend invitations. Prevent…
DaleMcGrew Jun 23, 2022
e279391
Merge pull request #1851 from DaleMcGrew/Dale_WVS_June19-2022
DaleMcGrew Jun 23, 2022
51873c0
Broke up the steps of voterContactListSave so we can provide feedback…
DaleMcGrew Jun 24, 2022
bc1940b
Merge pull request #1852 from DaleMcGrew/Dale_WVS_June19-2022
DaleMcGrew Jun 24, 2022
3871c5c
fix: requirements.txt to reduce vulnerabilities
snyk-bot Jul 5, 2022
c138fa0
Sped up some "move" functions to make the friend acceptance process f…
DaleMcGrew Jul 7, 2022
2533f5f
Merge pull request #1855 from DaleMcGrew/Dale_WVS_June19-2022
DaleMcGrew Jul 7, 2022
c5db306
Fixed crashing bug.
DaleMcGrew Jul 7, 2022
a292cee
Merge pull request #1856 from DaleMcGrew/Dale_WVS_July7-2022
DaleMcGrew Jul 7, 2022
441f167
Testing fix where email not marked as signed in.
DaleMcGrew Jul 8, 2022
3d576cc
Merge pull request #1857 from DaleMcGrew/Dale_WVS_July7-2022
DaleMcGrew Jul 8, 2022
d5e4810
Supporting delete_all_voter_information_permanently triggered from We…
DaleMcGrew Jul 9, 2022
286570c
Merge pull request #1858 from DaleMcGrew/Dale_WVS_July7-2022
DaleMcGrew Jul 9, 2022
1f68801
Removed some commented out HTML from many email templates (for improv…
DaleMcGrew Jul 10, 2022
414a125
Merge pull request #1859 from DaleMcGrew/Dale_WVS_July7-2022
DaleMcGrew Jul 10, 2022
c094ae3
Catch an exception that is happening in retrieve_sql_tables_as_csv fo…
SailingSteve Jul 11, 2022
a90a230
Merge pull request #1860 from SailingSteve/stevePyJyl11-315pm
DaleMcGrew Jul 11, 2022
83e820b
Git date experiment 7
SailingSteve Jul 12, 2022
0d25b47
Git date experiment 7
SailingSteve Jul 12, 2022
ade0ac3
Git date experiment 7
SailingSteve Jul 12, 2022
a2bfa8b
Merge branch 'develop' into stevePyJuly12-851am
SailingSteve Jul 12, 2022
8e7a5d7
Merge pull request #1861 from SailingSteve/stevePyJuly12-851am
DaleMcGrew Jul 12, 2022
2eb48ac
Git date experiment 8, new git_commit_hash reader and use /tmp/ as cw…
SailingSteve Jul 12, 2022
cd3093d
Merge pull request #1862 from SailingSteve/stevePyJuly12-925am
DaleMcGrew Jul 12, 2022
dcc9253
3rd try to use /tmp/ as cwd for retrieveSQLTables
SailingSteve Jul 12, 2022
a687b1f
Merge pull request #1863 from SailingSteve/stevePythonJuly12-2pm
DaleMcGrew Jul 12, 2022
a84cc9c
Experiment 10, still confirming /tmp/ dir for retrieve_sql_tables_as_csv
SailingSteve Jul 13, 2022
d38c9e1
Experiment 10, still confirming /tmp/ dir for retrieve_sql_tables_as_csv
SailingSteve Jul 13, 2022
d982956
Merge pull request #1864 from SailingSteve/stevePythonJuly13-830am
DaleMcGrew Jul 13, 2022
dacfedf
Experiment 11, still confirming /tmp/ dir for retrieve_sql_tables_as_csv
SailingSteve Jul 13, 2022
86a4c78
Merge pull request #1865 from SailingSteve/stevePythonJuly13-1006am
DaleMcGrew Jul 13, 2022
bdf6702
Experiment 12, still confirming /tmp/ dir for retrieve_sql_tables_as_csv
SailingSteve Jul 13, 2022
de4a158
Merge pull request #1866 from SailingSteve/stevePythonJuly13-1022am
DaleMcGrew Jul 13, 2022
df05c13
Experiment 13, eliminated temp files
SailingSteve Jul 13, 2022
efbe9d0
Merge pull request #1867 from SailingSteve/stevePythonJuly13-1110am
DaleMcGrew Jul 13, 2022
c787357
Experiment 14, narrowing in on psycopg2-binary issue
SailingSteve Jul 13, 2022
3a208da
Merge pull request #1868 from SailingSteve/stevePythonJuly13-1245pm
DaleMcGrew Jul 13, 2022
4395eeb
Experiment 15, exploring copy_expert simplification
SailingSteve Jul 13, 2022
e38ea38
Merge pull request #1869 from SailingSteve/stevePythonJuly13-3pm
DaleMcGrew Jul 13, 2022
e483f73
Changed election list sort to pay attention to election name order, s…
DaleMcGrew Jul 13, 2022
73c2a67
Merge pull request #1870 from DaleMcGrew/Dale_WVS_July13-2022
DaleMcGrew Jul 13, 2022
043b5e7
Changed election list sort to pay attention to election name order, s…
DaleMcGrew Jul 14, 2022
2e7039a
Merge pull request #1871 from DaleMcGrew/Dale_WVS_July13-2022
DaleMcGrew Jul 14, 2022
a14bb82
Experiment 16, exploring copy_expert simplification, part 2
SailingSteve Jul 14, 2022
30beefc
Experiment 16, exploring copy_expert simplification, part 2
SailingSteve Jul 14, 2022
58b3e70
Merge pull request #1872 from SailingSteve/stevePythonJuly13-8pm
DaleMcGrew Jul 14, 2022
f269f45
Experiment 17, exploring copy_expert simplification, part 3
SailingSteve Jul 14, 2022
8db66a6
Experiment 17, exploring copy_expert simplification, part 3
SailingSteve Jul 14, 2022
cd7eef9
Merge pull request #1873 from SailingSteve/stevePythonJuly14-930am
DaleMcGrew Jul 14, 2022
dda5192
Experiment 18, exploring copy_expert simplification
SailingSteve Jul 14, 2022
def7930
Merge pull request #1874 from SailingSteve/stevePythonJuly14
DaleMcGrew Jul 14, 2022
d2f2f46
Experiment 19, exploring copy_expert simplification
SailingSteve Jul 14, 2022
e5727ef
Merge pull request #1875 from SailingSteve/stevePythonJul14-1120am
DaleMcGrew Jul 14, 2022
e521a5e
Experiment 20, exploring copy_expert simplification
SailingSteve Jul 14, 2022
c2205f1
Merge pull request #1876 from SailingSteve/stevePythonJuly14-1209pm
DaleMcGrew Jul 14, 2022
0081883
Experiment 21, exploring copy_expert simplification
SailingSteve Jul 14, 2022
a1ffacd
Merge pull request #1877 from SailingSteve/stevePythonJuly14-311pm
DaleMcGrew Jul 14, 2022
b1ac406
Updated create_new_voter_account process to auto-verify emails entere…
DaleMcGrew Jul 14, 2022
9030135
Merge pull request #1878 from DaleMcGrew/Dale_WVS_July13-2022
DaleMcGrew Jul 14, 2022
56a33d0
Experiment 22, exploring copy_expert simplification
SailingSteve Jul 14, 2022
ecd90b4
Merge pull request #1879 from SailingSteve/stevePythonJuly14-421pm
DaleMcGrew Jul 14, 2022
1043441
Experiment 23, exploring copy_expert simplification
SailingSteve Jul 14, 2022
ce2cb64
Merge pull request #1880 from SailingSteve/stevePythonJuly14-441pm
DaleMcGrew Jul 14, 2022
f2e4f19
Experiment 24, exploring copy_expert simplification
SailingSteve Jul 15, 2022
74956c4
Experiment 24, exploring copy_expert simplification
SailingSteve Jul 15, 2022
d3ca4bc
Merge pull request #1881 from SailingSteve/steveJuly14-7pm
DaleMcGrew Jul 15, 2022
9055d27
Added empty alt tags to images and role="presentation" to tables in a…
DaleMcGrew Jul 15, 2022
21af552
Merge pull request #1882 from DaleMcGrew/Dale_WVS_Jul14-2022
DaleMcGrew Jul 15, 2022
2528db5
Experiment 25, exploring copy_expert simplification
SailingSteve Jul 15, 2022
395908f
Merge pull request #1883 from SailingSteve/stevePythonJuly15-941am
DaleMcGrew Jul 15, 2022
62c24e5
Experiment 26, exploring copy_expert simplification
SailingSteve Jul 15, 2022
f969e1e
Merge pull request #1884 from SailingSteve/stevePythonJuly15-235pm
DaleMcGrew Jul 15, 2022
1999391
Experiment 267, exploring copy_expert simplification
SailingSteve Jul 15, 2022
0bc2205
Merge pull request #1885 from SailingSteve/stevePythonJuly15-308pm
DaleMcGrew Jul 15, 2022
44318ae
Update to the friendInvitationByEmailSend for sending email invitations.
DaleMcGrew Jul 17, 2022
6383854
Merge pull request #1886 from DaleMcGrew/Dale_WVS_Jul14-2022
DaleMcGrew Jul 17, 2022
6c2cde9
Removed the experimental logging in retrieve_tables. Finished move_v…
SailingSteve Jul 17, 2022
98e5018
Merge pull request #1887 from SailingSteve/stevePythonJuly17-225pm
DaleMcGrew Jul 18, 2022
4fdb057
Removed email_open_url since SendGrid provides that functionality. Up…
DaleMcGrew Jul 21, 2022
1a9fb00
Merge pull request #1889 from DaleMcGrew/Dale_WVS_Jul17-2022
DaleMcGrew Jul 21, 2022
6f8e81d
Protected against a crash in move_voter_guide_possibility_positions_t…
SailingSteve Jul 21, 2022
d9975e9
Protected against a crash in move_voter_guide_possibility_positions_t…
SailingSteve Jul 21, 2022
b704e56
Protected against a crash in move_voter_guide_possibility_positions_t…
SailingSteve Jul 21, 2022
0c7f2e7
Merge pull request #1890 from SailingSteve/stevePythonJuly20-2pm
DaleMcGrew Jul 21, 2022
7a54f8c
Converted List-Unsubscribe to run without browser with direct call to…
DaleMcGrew Jul 21, 2022
38ba241
Missed on constant change to unsubscribe modifier
DaleMcGrew Jul 21, 2022
d0c6acd
Merge pull request #1891 from DaleMcGrew/Dale_WVS_Jul21-2022
DaleMcGrew Jul 21, 2022
aec49a1
Merge pull request #1853 from wevote/snyk-fix-62bb202541d32db29b1d5ab…
DaleMcGrew Jul 22, 2022
7a357da
Trailing slash on list_unsubscribe_urls required. Implemented SMTP em…
DaleMcGrew Jul 25, 2022
c97decd
Handles url_to_scan without a scheme, like http or https
SailingSteve Jul 25, 2022
901e44a
Handles url_to_scan without a scheme, like http or https
SailingSteve Jul 25, 2022
d43e9cf
Merge pull request #1893 from SailingSteve/stevePythonJuly27-3pm
DaleMcGrew Jul 25, 2022
e3b8ae6
Merge pull request #1892 from DaleMcGrew/Dale_WVS_July25-2022
DaleMcGrew Jul 25, 2022
bb8ebab
Augmenting voterBallotItemsRetrieve with full measure data. Added Bal…
DaleMcGrew Jul 26, 2022
60c48a9
Merge pull request #1894 from DaleMcGrew/Dale_WVS_July25-2022
DaleMcGrew Jul 26, 2022
a32199f
Including measure_title in voterBallotItemsRetrieve from full measure…
DaleMcGrew Jul 26, 2022
52bc9c7
Merge pull request #1895 from DaleMcGrew/Dale_WVS_July25-2022
DaleMcGrew Jul 26, 2022
2cc0063
Converted many database retrieval calls to use read_only, to increase…
DaleMcGrew Jul 27, 2022
6fd394a
Merge pull request #1896 from DaleMcGrew/Dale_WVS_Jul26-2022
DaleMcGrew Jul 27, 2022
8b68567
Fixed problem with candidate state_code being removed when you 'Choos…
DaleMcGrew Jul 27, 2022
ece760a
Merge pull request #1897 from DaleMcGrew/Dale_WVS_Jul27-2022
DaleMcGrew Jul 27, 2022
00e2030
Adjusting the number of map_points_retrieved_each_batch_chunk we retr…
DaleMcGrew Jul 28, 2022
48be842
Merge pull request #1898 from DaleMcGrew/Dale_WVS_Jul27-2022
DaleMcGrew Jul 28, 2022
4405cae
Adjusting map points per batch chunk.
DaleMcGrew Jul 30, 2022
624689a
Merge pull request #1899 from DaleMcGrew/Dale_WVS_Jul27-2022
DaleMcGrew Jul 30, 2022
df4df80
Adjusting map points per batch chunk.
DaleMcGrew Jul 30, 2022
86542ea
Merge pull request #1900 from DaleMcGrew/Dale_WVS_Jul27-2022
DaleMcGrew Jul 30, 2022
0652662
Update voter_email_address_sign_in_doc.py
yuli48 Aug 2, 2022
d8192f8
Merge pull request #1901 from yuli48/EmailAddress
DaleMcGrew Aug 3, 2022
61e3fb2
Better Instagram handle filtering.
DaleMcGrew Aug 3, 2022
bde6979
Merge pull request #1903 from DaleMcGrew/Dale_WVS_Aug3-2022
DaleMcGrew Aug 3, 2022
fddb458
fix: requirements.txt to reduce vulnerabilities
snyk-bot Aug 3, 2022
efb19aa
First commit test
holdenliu Aug 5, 2022
99a581a
Merge pull request #1904 from wevote/snyk-fix-c8e77fa1cc42c50f44a37bd…
DaleMcGrew Aug 8, 2022
844465d
Update voter_email_address_save_doc.py
yuli48 Aug 8, 2022
69bba40
Merge pull request #1905 from yuli48/EmailAddress
DaleMcGrew Aug 9, 2022
442c4c3
Added more fields to SharedItem table. Increased number of VoterGuide…
DaleMcGrew Aug 10, 2022
dedcca4
Merge pull request #1906 from DaleMcGrew/Dale_WVS_Aug3-2022
DaleMcGrew Aug 10, 2022
781656c
Increased DATA_UPLOAD_MAX_NUMBER_FIELDS
DaleMcGrew Aug 10, 2022
865ac69
Increased DATA_UPLOAD_MAX_NUMBER_FIELDS
DaleMcGrew Aug 10, 2022
6c5d88e
Merge pull request #1907 from DaleMcGrew/Dale_WVS_Aug10-2022
DaleMcGrew Aug 10, 2022
5699346
Update voter_email_address_save_doc.py
Jakaboy3 Aug 12, 2022
5dab495
Merge pull request #1908 from Jakaboy3/Email_Address_Update_files
DaleMcGrew Aug 12, 2022
e75af6e
added source filter to map points
holdenliu Aug 17, 2022
f01f654
Adds an app-adds.txt for facebook.
SailingSteve Aug 19, 2022
528dcf4
Merge pull request #1909 from SailingSteve/stevePythonAug19-noon
DaleMcGrew Aug 19, 2022
6105230
Added Dynamically Created buttons for filters on Map points
holdenliu Aug 21, 2022
93a4862
Iteration on how we calculate map_points_retrieved_each_batch_chunk. …
DaleMcGrew Sep 7, 2022
5ff8f80
Merge pull request #1910 from DaleMcGrew/Dale_WVS_Aug10-2022
DaleMcGrew Sep 9, 2022
d443985
Added a general maintenance task to generate voter guides for every e…
DaleMcGrew Sep 13, 2022
a076bf1
Added a general maintenance task to generate voter guides for every e…
DaleMcGrew Sep 13, 2022
5d8dbbd
Merge pull request #1912 from DaleMcGrew/Dale_WVS_Sept9-2022
DaleMcGrew Sep 13, 2022
9654ca7
Testing
DaleMcGrew Sep 13, 2022
793e395
Merge pull request #1913 from DaleMcGrew/Dale_WVS_Sept9-2022
DaleMcGrew Sep 13, 2022
ed9cea7
Problem with query not getting executed at the right time, leading to…
DaleMcGrew Sep 13, 2022
600e341
Merge pull request #1914 from DaleMcGrew/Dale_WVS_Sept9-2022
DaleMcGrew Sep 13, 2022
7423762
Added phone_number and api_type fields for importing contacts from iP…
SailingSteve Sep 14, 2022
6369926
Merge pull request #1915 from SailingSteve/stevePythonSept14-1235pm
DaleMcGrew Sep 15, 2022
fde9984
voterContactListRetrieve returns separate counts for google and apple…
SailingSteve Sep 20, 2022
668dcf3
Merge pull request #1917 from SailingSteve/stevePythonSept20-1pm
DaleMcGrew Sep 20, 2022
27a70b3
Problem with query not getting executed at the right time, leading to…
DaleMcGrew Sep 20, 2022
76a641d
Merge pull request #1918 from DaleMcGrew/Dale_WVS_Sept20-2022b
DaleMcGrew Sep 20, 2022
ecc4e66
Added the ability to enter alternate chosen_domain_string values (for…
DaleMcGrew Oct 8, 2022
23c8434
Merge pull request #1921 from DaleMcGrew/Dale_WVS_Sept20-2022b
DaleMcGrew Oct 8, 2022
6ca7db3
Added election day to the office listing admin page.
DaleMcGrew Oct 9, 2022
0424291
Merge branch 'Dale_WVS_Sept20-2022b' of https://github.com/DaleMcGrew…
DaleMcGrew Oct 10, 2022
e6bf55e
Merge pull request #1922 from DaleMcGrew/Dale_WVS_Sept20-2022b
DaleMcGrew Oct 10, 2022
8a1b3ea
Merge branch 'develop' of https://github.com/wevote/WeVoteServer into…
DaleMcGrew Oct 10, 2022
8618a50
Including state_code in election list data so we can show "Sample Bal…
DaleMcGrew Oct 15, 2022
9b618e6
Merge pull request #1923 from DaleMcGrew/Dale_WVS_Oct10-2022
DaleMcGrew Oct 15, 2022
8f017e4
Merge branch 'develop' into develop
holdenliu Oct 21, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ node_modules/
/**/migrations/*.py
!/**/migrations/__init__.py
config/environment_variables.json
config/environment_variables*.bak.json
web_app/build/*

# Heroku Related #
Expand Down
73 changes: 59 additions & 14 deletions activity/controllers.py
Original file line number Diff line number Diff line change
Expand Up @@ -621,6 +621,28 @@ def notice_friend_endorsements_send(
# subject += " is getting ready to vote"
activity_description += "is reviewing the ballot"

# "recipient_unsubscribe_url": web_app_root_url_verified + "/settings/notifications/esk/" +
# recipient_email_subscription_secret_key,

# Unsubscribe link in email
recipient_unsubscribe_url = \
"{root_url}/unsubscribe/{email_secret_key}/friendopinionsall" \
"".format(
email_secret_key=recipient_email_subscription_secret_key,
root_url=web_app_root_url_verified,
)
# Instant unsubscribe link in email header
list_unsubscribe_url = \
"{root_url}/apis/v1/unsubscribeInstant/{email_secret_key}/friendopinionsall/" \
"".format(
email_secret_key=recipient_email_subscription_secret_key,
root_url=WE_VOTE_SERVER_ROOT_URL,
)
# Instant unsubscribe email address in email header
# from voter.models import NOTIFICATION_FRIEND_OPINIONS_OTHER_REGIONS_EMAIL
list_unsubscribe_mailto = "[email protected]?subject=unsubscribe%20{setting}" \
"".format(setting='friendopinionsall')

# Variables used by templates/email_outbound/email_templates/notice_friend_endorsements.txt and .html
template_variables_for_json = {
"activity_description": activity_description,
Expand All @@ -632,10 +654,8 @@ def notice_friend_endorsements_send(
"sender_description": speaker_voter_description,
"sender_network_details": speaker_voter_network_details,
"recipient_name": recipient_name,
"recipient_unsubscribe_url": recipient_unsubscribe_url,
"recipient_voter_email": recipient_email,
"recipient_unsubscribe_url": web_app_root_url_verified + "/settings/notifications/esk/" +
recipient_email_subscription_secret_key,
"email_open_url": WE_VOTE_SERVER_ROOT_URL + "/apis/v1/emailOpen?email_key=1234",
"view_new_endorsements_url": web_app_root_url_verified + "/news/a/" + activity_tidbit_we_vote_id,
"view_your_ballot_url": web_app_root_url_verified + "/ballot",
}
Expand All @@ -651,7 +671,10 @@ def notice_friend_endorsements_send(
recipient_email_we_vote_id=recipient_email_we_vote_id,
recipient_voter_email=recipient_email,
template_variables_in_json=template_variables_in_json,
kind_of_email_template=kind_of_email_template)
kind_of_email_template=kind_of_email_template,
list_unsubscribe_mailto=list_unsubscribe_mailto,
list_unsubscribe_url=list_unsubscribe_url,
)
status += outbound_results['status'] + " "
success = outbound_results['success']
if outbound_results['email_outbound_description_saved']:
Expand Down Expand Up @@ -894,22 +917,41 @@ def notice_voter_daily_summary_send( # NOTICE_VOTER_DAILY_SUMMARY
if not positive_value_exists(subject):
subject = "Your friends have commented"

# Unsubscribe link in email
# "recipient_unsubscribe_url": web_app_root_url_verified + "/settings/notifications/esk/" +
# recipient_email_subscription_secret_key,
recipient_unsubscribe_url = \
"{root_url}/unsubscribe/{email_secret_key}/dailyfriendactivity" \
"".format(
email_secret_key=recipient_email_subscription_secret_key,
root_url=web_app_root_url_verified,
)
# Instant unsubscribe link in email header
list_unsubscribe_url = \
"{root_url}/apis/v1/unsubscribeInstant/{email_secret_key}/dailyfriendactivity/" \
"".format(
email_secret_key=recipient_email_subscription_secret_key,
root_url=WE_VOTE_SERVER_ROOT_URL,
)
# Instant unsubscribe email address in email header
# from voter.models import NOTIFICATION_VOTER_DAILY_SUMMARY_EMAIL
list_unsubscribe_mailto = "[email protected]?subject=unsubscribe%20{setting}" \
"".format(setting='dailyfriendactivity')

template_variables_for_json = {
"introduction_line": introduction_line,
"subject": subject,
"friend_activity_dict_list": friend_activity_dict_list_modified,
"introduction_line": introduction_line,
"subject": subject,
"friend_activity_dict_list": friend_activity_dict_list_modified,
# "sender_name": speaker_voter_name,
# "sender_photo": speaker_voter_photo,
# "sender_email_address": speaker_voter_email, # Does not affect the "From" email header
# "sender_description": speaker_voter_description,
# "sender_network_details": speaker_voter_network_details,
"recipient_name": recipient_name,
"recipient_voter_email": recipient_email,
"recipient_unsubscribe_url": web_app_root_url_verified + "/settings/notifications/esk/" +
recipient_email_subscription_secret_key,
"email_open_url": WE_VOTE_SERVER_ROOT_URL + "/apis/v1/emailOpen?email_key=1234",
"recipient_name": recipient_name,
"recipient_unsubscribe_url": recipient_unsubscribe_url,
"recipient_voter_email": recipient_email,
"view_main_discussion_page_url": web_app_root_url_verified + "/news",
"view_your_ballot_url": web_app_root_url_verified + "/ballot",
"view_your_ballot_url": web_app_root_url_verified + "/ballot",
}
template_variables_in_json = json.dumps(template_variables_for_json, ensure_ascii=True)
from_email_for_daily_summary = "We Vote <[email protected]>" # TODO DALE Make system variable
Expand All @@ -924,7 +966,10 @@ def notice_voter_daily_summary_send( # NOTICE_VOTER_DAILY_SUMMARY
recipient_email_we_vote_id=recipient_email_we_vote_id,
recipient_voter_email=recipient_email,
template_variables_in_json=template_variables_in_json,
kind_of_email_template=kind_of_email_template)
kind_of_email_template=kind_of_email_template,
list_unsubscribe_mailto=list_unsubscribe_mailto,
list_unsubscribe_url=list_unsubscribe_url,
)
status += outbound_results['status'] + " "
success = outbound_results['success']
if outbound_results['email_outbound_description_saved']:
Expand Down
9 changes: 5 additions & 4 deletions admin_tools/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
# Brought to you by We Vote. Be good.
# -*- coding: UTF-8 -*-

from config.base import get_environment_variable, get_git_merge_date, get_node_version, get_postgres_version, \
get_python_version, LOGIN_URL
from config.base import get_environment_variable, get_node_version, get_postgres_version, \
get_python_version, LOGIN_URL, get_git_commit_hash
from ballot.models import BallotReturned, VoterBallotSaved
from candidate.models import CandidateCampaign, CandidateManager
from candidate.controllers import candidates_import_from_sample_file
Expand Down Expand Up @@ -113,7 +113,8 @@ def admin_home_view(request):
'google_civic_election_id': google_civic_election_id,
'python_version': get_python_version(),
'node_version': get_node_version(),
'git_merge_date': get_git_merge_date(),
'git_commit_hash': get_git_commit_hash(False),
'git_commit_hash_url': get_git_commit_hash(True),
'postgres_version': get_postgres_version(),
'shared_link_clicked_unique_sharer_count': shared_link_clicked_unique_sharer_count,
'shared_link_clicked_unique_viewer_count': shared_link_clicked_unique_viewer_count,
Expand Down Expand Up @@ -1711,7 +1712,7 @@ def login_we_vote(request):

voter_manager = VoterManager()
voter_device_link_manager = VoterDeviceLinkManager()
results = voter_manager.retrieve_voter_from_voter_device_id(voter_api_device_id)
results = voter_manager.retrieve_voter_from_voter_device_id(voter_api_device_id, read_only=True)
if results['voter_found']:
voter_on_stage = results['voter']
voter_on_stage_id = voter_on_stage.id
Expand Down
3 changes: 2 additions & 1 deletion analytics/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,8 @@ def retrieve_analytics_processed_list(
success = False

try:
retrieved_voter_we_vote_id_list = voter_list_query.values_list('voter_we_vote_id', flat=True).distinct()
voter_list_query = voter_list_query.values_list('voter_we_vote_id', flat=True).distinct()
retrieved_voter_we_vote_id_list = list(voter_list_query)
retrieved_voter_we_vote_id_list_found = True
except Exception as e:
retrieved_voter_we_vote_id_list_found = False
Expand Down
10 changes: 8 additions & 2 deletions apis_v1/documentation_source/friend_list_doc.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def friend_list_doc_template_values(url_root):
' "state_code": string,\n' \
' "kind_of_list": string, \n' \
' "friend_list": list\n' \
' [\n' \
' [{\n' \
' "voter_we_vote_id": string,\n' \
' "voter_display_name": string,\n' \
' "voter_photo_url_large": string,\n' \
Expand All @@ -74,8 +74,14 @@ def friend_list_doc_template_values(url_root):
' "invitation_status": string,\n' \
' "invitation_sent_to": string,\n' \
' "positions_taken": number,\n' \
' "mutual_friend_count": number,\n' \
' "mutual_friend_preview_list": list\n' \
' [{\n' \
' "friend_display_name": string,\n' \
' "friend_photo_url_medium": string,\n' \
' }],\n' \
' "mutual_friends": number,\n' \
' ],\n' \
' }],\n' \
'}'

template_values = {
Expand Down
3 changes: 2 additions & 1 deletion apis_v1/documentation_source/friend_lists_all_doc.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ def friend_lists_all_doc_template_values(url_root):
'api_slug': 'friendListsAll',
'api_introduction':
"Request information about a voter's friends, including invitations to become a friend, "
"a list of current friends, and friends you share in common with another voter. This API differs from friendList in that it "
"a list of current friends, and friends you share in common with another voter. "
"This API differs from friendList in that it "
"returns six different lists at once.",
'try_now_link': 'apis_v1:friendListsAllView',
'url_root': url_root,
Expand Down
12 changes: 9 additions & 3 deletions apis_v1/documentation_source/voter_contact_list_retrieve_doc.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ def voter_contact_list_retrieve_doc_template_values(url_root):
Show documentation about voterContactListRetrieve
"""
required_query_parameter_list = [
{
'name': 'voter_device_id',
'value': 'string', # boolean, integer, long, string
'description': 'An 88 character unique identifier linked to a voter record on the server',
},
{
'name': 'api_key',
'value': 'string (from post, cookie, or get (in that order))', # boolean, integer, long, string
Expand Down Expand Up @@ -53,16 +58,17 @@ def voter_contact_list_retrieve_doc_template_values(url_root):
' "has_data_from_google_people_api": boolean,\n' \
' "ignore_contact": boolean,\n' \
' "imported_by_voter_we_vote_id": string,\n' \
' "is_friend": boolean,\n' \
' "state_code": string,\n' \
' },],\n' \
'}'

template_values = {
'api_name': 'voterPlanListRetrieve',
'api_slug': 'voterPlanListRetrieve',
'api_name': 'voterContactListRetrieve',
'api_slug': 'voterContactListRetrieve',
'api_introduction':
"Retrieve a voter_contact_list that we can display publicly.",
'try_now_link': 'apis_v1:voterPlanListRetrieveView',
'try_now_link': 'apis_v1:voterContactListRetrieveView',
'try_now_link_variables_dict': try_now_link_variables_dict,
'url_root': url_root,
'get_or_post': 'GET',
Expand Down
74 changes: 74 additions & 0 deletions apis_v1/documentation_source/voter_contact_save_doc.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# apis_v1/documentation_source/voter_contact_save_doc.py
# Brought to you by We Vote. Be good.
# -*- coding: UTF-8 -*-


def doc_template_values(url_root):
"""
Show documentation about voterContactSave
"""
required_query_parameter_list = [
{
'name': 'api_key',
'value': 'string (from post, cookie, or get (in that order))', # boolean, integer, long, string
'description': 'The unique key provided to any organization using the WeVoteServer APIs',
},
{
'name': 'voter_device_id',
'value': 'string', # boolean, integer, long, string
'description': 'An 88 character unique identifier linked to a voter record on the server. ',
},
{
'name': 'email_address_text',
'value': 'string', # boolean, integer, long, string
'description': 'The email of the VoterContactEmail that we want to alter.',
},
]

optional_query_parameter_list = [
{
'name': 'ignore_voter_contact',
'value': 'boolean', # boolean, integer, long, string
'description': 'Set to true if the voter wants to ignore this VoterContact entry.',
},
]

potential_status_codes_list = [
{
'code': 'VALID_VOTER_DEVICE_ID_MISSING',
'description': 'A valid voter_device_id parameter was not included. Cannot proceed.',
},
{
'code': 'VOTER_NOT_FOUND_FROM_VOTER_DEVICE_ID',
'description': 'No voter could be found from the voter_device_id',
},
]

try_now_link_variables_dict = {
# 'voter_device_id': '',
}

api_response = '{\n' \
' "success": boolean,\n' \
' "status": string,\n' \
' "ignore_voter_contact" boolean, \n' \
' "email_address_text": string, \n' \
'}'

template_values = {
'api_name': 'voterContactSave',
'api_slug': 'voterContactSave',
'api_introduction':
'Make changes to specific voterContactEmail entries.',
'try_now_link': 'apis_v1:voterContactSaveView',
'try_now_link_variables_dict': try_now_link_variables_dict,
'url_root': url_root,
'get_or_post': 'get',
'required_query_parameter_list': required_query_parameter_list,
'optional_query_parameter_list': optional_query_parameter_list,
'api_response': api_response,
'api_response_notes':
"",
'potential_status_codes_list': potential_status_codes_list,
}
return template_values
11 changes: 8 additions & 3 deletions apis_v1/documentation_source/voter_email_address_save_doc.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,16 @@ def voter_email_address_save_doc_template_values(url_root):
' "text_for_email_address": string,\n' \
' "make_primary_email": boolean,\n' \
' "delete_email": boolean,\n' \
' "email_address_saved_we_vote_id": string,\n' \
' "email_address_we_vote_id": string,\n' \
' "email_address_saved_we_vote_id": boolean,\n' \
' "email_address_already_owned_by_other_voter": boolean,\n' \
' "email_address_already_owned_by_this_voter": boolean,\n' \
' "email_address_created": boolean,\n' \
' "email_address_deleted": boolean,\n' \
' "email_address_not_valid": boolean,\n' \
' "email_address_deleted": boolean,\n' \
' "verification_email_sent": boolean,\n' \
' "email_address_already_owned_by_other_voter": boolean,\n' \
' "link_to_sign_in_email_sent": boolean,\n' \
' "sign_in_code_email_sent": boolean,\n' \
' "email_address_found": boolean,\n' \
' "email_address_list_found": boolean,\n' \
' "email_address_list": list\n' \
Expand All @@ -96,6 +100,7 @@ def voter_email_address_save_doc_template_values(url_root):
' "email_ownership_is_verified": boolean,\n' \
' "voter_we_vote_id": string,\n' \
' "email_we_vote_id": string,\n' \
' "secret_code_system_locked_for_this_voter_device_id": boolean\n' \
' ],\n' \
'}'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ def voter_email_address_sign_in_doc_template_values(url_root):
' "voter_device_id": string (88 characters long),\n' \
' "email_ownership_is_verified": boolean,\n' \
' "email_secret_key_belongs_to_this_voter": boolean,\n' \
' "email_sign_in_attempted": boolean,\n' \
' "email_address_found": boolean,\n' \
' "yes_please_merge_accounts": boolean,\n' \
' "voter_we_vote_id_from_secret_key": string,\n' \
'}'

template_values = {
Expand Down
Loading