1
0
Fork 0
mirror of https://github.com/Findus23/cr-search.git synced 2024-09-19 15:23:44 +02:00
cr-search/colors.py

21 lines
431 B
Python
Raw Normal View History

2020-03-07 10:45:39 +01:00
from models import Person
2020-03-08 18:48:14 +01:00
colors_c2 = {
2020-03-07 10:45:39 +01:00
"Laura": "#59c3f9",
"Marisha": "#00146e",
"Liam": "#fe8413",
"Taliesin": "#be1c0d",
"Ashley": "#868984",
"Sam": "#dae1dd",
"Travis": "#076708",
"Matt": "#471f0e" # random color
}
p: Person
for p in Person.select():
print(p)
2020-03-08 18:48:14 +01:00
if p.name in colors_c2.keys() and p.season == 2:
2020-03-07 10:45:39 +01:00
print(p.name)
2020-03-08 18:48:14 +01:00
p.color = colors_c2[p.name]
2020-03-07 10:45:39 +01:00
p.save()