Upgrade Bulma and begin drug info screen and favourites

This commit is contained in:
2024-05-17 22:47:16 +01:00
parent 4c8411b863
commit 46b1858897
20 changed files with 745 additions and 517 deletions

View File

@@ -21,6 +21,7 @@ class PsychWikiClient(GraphQLClient, BaseClient):
Store the data in the database.
"""
for drug in data["substances"]:
print("DRUG ITER", drug)
try:
drug_obj = Drug.objects.get(name=drug["name"])
except Drug.DoesNotExist:
@@ -89,6 +90,7 @@ class PsychWikiClient(GraphQLClient, BaseClient):
)
if created or dosage not in drug_obj.dosages.all():
drug_obj.dosages.add(dosage)
print("YES DOSAGE", drug_obj.dosages)
# Parsing timing information
timing = roa["duration"]