food logger context tips
This commit is contained in:
@@ -172,18 +172,20 @@ class HydrationGoalForm(forms.ModelForm):
|
||||
class FoodGoalForm(forms.ModelForm):
|
||||
class Meta:
|
||||
model = UserSettings
|
||||
fields = ('daily_calorie_goal', 'carbohydrate_goal_g', 'protein_goal_g', 'fat_goal_g')
|
||||
fields = ('daily_calorie_goal', 'carbohydrate_goal_g', 'protein_goal_g', 'fat_goal_g', 'fibre_goal_g')
|
||||
labels = {
|
||||
'daily_calorie_goal': 'Daily calorie goal (kcal)',
|
||||
'carbohydrate_goal_g': 'Daily carbohydrate target (g)',
|
||||
'protein_goal_g': 'Daily protein target (g)',
|
||||
'fat_goal_g': 'Daily fat target (g)',
|
||||
'fibre_goal_g': 'Daily fibre goal (g)',
|
||||
}
|
||||
widgets = {
|
||||
'daily_calorie_goal': forms.NumberInput(attrs={'min': 0, 'step': 1}),
|
||||
'carbohydrate_goal_g': forms.NumberInput(attrs={'min': 0, 'step': '0.1'}),
|
||||
'protein_goal_g': forms.NumberInput(attrs={'min': 0, 'step': '0.1'}),
|
||||
'fat_goal_g': forms.NumberInput(attrs={'min': 0, 'step': '0.1'}),
|
||||
'fibre_goal_g': forms.NumberInput(attrs={'min': 0, 'step': '0.1'}),
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user