added ability to link recipes to ingredients

This commit is contained in:
vabene1111
2020-03-17 18:44:11 +01:00
parent a60b09e491
commit 90dbc36402
10 changed files with 94 additions and 6 deletions

View File

@ -141,6 +141,13 @@ class KeywordForm(forms.ModelForm):
widgets = {'icon': EmojiPickerTextInput}
class IngredientForm(forms.ModelForm):
class Meta:
model = Ingredient
fields = ('name', 'recipe')
widgets = {'recipe': SelectWidget}
class StorageForm(forms.ModelForm):
username = forms.CharField(widget=forms.TextInput(attrs={'autocomplete': 'new-password'}), required=False)
password = forms.CharField(widget=forms.TextInput(attrs={'autocomplete': 'new-password', 'type': 'password'}),