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

@@ -5,7 +5,7 @@ from mixins.restrictions import RestrictedFormMixin
from mxs.restrictions import RestrictedFormMixinStaff
from .models import Drug, NotificationSettings, User
from .models import Drug, Favourite, NotificationSettings, User
# Create your forms here.
@@ -78,3 +78,20 @@ class DrugForm(RestrictedFormMixinStaff, ModelForm):
"actions": "Actions, what does it do on an objective level?",
"experiences": "Experiences, what do people experience?",
}
class FavouriteForm(RestrictedFormMixin, ModelForm):
class Meta:
model = Favourite
fields = (
"nickname",
"name",
"drug_class",
"common_name",
)
help_texts = {
"nickname": "Call it whatever you like.",
"name": "Lysergic acid diethylamide, Phenibut",
"drug_class": "Psychedelic, Sedative, Stimulant",
"common_name": "LSD",
}