adding food logging, phase 1
This commit is contained in:
@@ -169,6 +169,24 @@ class HydrationGoalForm(forms.ModelForm):
|
||||
widgets = {'daily_water_goal_ml': forms.NumberInput(attrs={'min': 250, 'max': 10000, 'step': 1})}
|
||||
|
||||
|
||||
class FoodGoalForm(forms.ModelForm):
|
||||
class Meta:
|
||||
model = UserSettings
|
||||
fields = ('daily_calorie_goal', 'carbohydrate_goal_g', 'protein_goal_g', 'fat_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)',
|
||||
}
|
||||
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'}),
|
||||
}
|
||||
|
||||
|
||||
class WaterIntakeForm(forms.Form):
|
||||
amount_ml = forms.IntegerField(min_value=1, max_value=3000)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user