-
Notifications
You must be signed in to change notification settings - Fork 1
/
scripts.txt
62 lines (51 loc) · 2 KB
/
scripts.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
*SHELL COMMANDS*
==
MARK A USER AS NOT ACCEPTING MATCHES
- Mark them as "No" in Mixpanel
email = "[email protected]"
from tablefor2.models import *
person = Profile.objects.get(email=email)
person.accept_matches = "No"
person.save()
==
REMOVE AN ERRONOUS MATCH
from tablefor2.models import *
email1 = "[email protected]"
email2 = "[email protected]"
person1 = Profile.objects.get(email=email1)
person2 = Profile.objects.get(email=email2)
full_name1 = person1.preferred_first_name + ' ' + person1.last_name
full_name2 = person2.preferred_first_name + ' ' + person2.last_name
match1 = Availability.objects.get(profile=person1, matched_name=full_name2)
match2 = Availability.objects.get(profile=person2, matched_name=full_name1)
match1.delete()
match2.delete()
==
ADD A MATCH
from tablefor2.models import *
email1 = "[email protected]"
email2 = "[email protected]"
person1 = Profile.objects.get(email=email1)
person2 = Profile.objects.get(email=email2)
full_name1 = person1.preferred_first_name + ' ' + person1.last_name
full_name2 = person2.preferred_first_name + ' ' + person2.last_name
match1 = Availability(profile=person1, matched_name=full_name2)
match1.matched_email = person2.email
match1.picture_url = person2.picture_url
match1.what_is_your_favorite_movie = person2.what_is_your_favorite_movie
match1.name_a_fun_fact_about_yourself = person2.name_a_fun_fact_about_yourself
match1.department = person2.department
match1.timezone = person2.timezone
match2 = Availability(profile=person2, matched_name=full_name1)
match2.matched_email = person2.email
match2.picture_url = person1.picture_url
match2.what_is_your_favorite_movie = person1.what_is_your_favorite_movie
match2.name_a_fun_fact_about_yourself = person1.name_a_fun_fact_about_yourself
match2.department = person1.department
match2.timezone = person1.timezone
if person1.location == person2.location:
match1.google_hangout = match2.google_hangout = "in person"
else:
match1.google_hangout = match2.google_hangout = "Google Hangout"
match1.save()
match2.save()