Created
May 16, 2021 23:19
-
-
Save EnkrateiaLucca/3d4d8f39e9a31a1746ffc4997dc4a15a to your computer and use it in GitHub Desktop.
Get projects data from database
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_projects_data(self,data_json,projects): | |
projects_data = {} | |
for p in projects: | |
if p!="Name" and p !="Date": | |
projects_data[p] = [data_json["results"][i]["properties"][p]["checkbox"] | |
for i in range(len(data_json["results"]))] | |
elif p=="Date": | |
dates = [data_json["results"][i]["properties"]["Date"]["date"]["start"] | |
for i in range(len(data_json["results"]))] | |
return projects_data,dates |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment